# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# a custom target that is always built
-DINKSCAPE_SOURCE_DIR=${CMAKE_SOURCE_DIR}
-DINKSCAPE_BINARY_DIR=${CMAKE_BINARY_DIR}
set_source_files_properties(
PROPERTIES GENERATED TRUE)
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# All folders for internal inkscape
# these call add_inkscape_source
add_subdirectory(display)
add_subdirectory(extension)
add_subdirectory(filters)
add_subdirectory(live_effects)
add_subdirectory(widgets)
# Directories containing lists files that describe building internal libraries
add_subdirectory(libavoid)
add_subdirectory(libcola)
add_subdirectory(libcroco)
add_subdirectory(libuemf)
add_subdirectory(libvpsc)
add_subdirectory(livarot)
add_subdirectory(libnrtype)
add_subdirectory(libdepixelize)
get_property(inkscape_global_SRC GLOBAL PROPERTY inkscape_global_SRC)
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
#add_inkscape_lib(sp_LIB "${sp_SRC}")
#add_inkscape_lib(inkscape_LIB "${inkscape_SRC}")
# Build everything except main and
inkview.c in a CMake "object" library.
# An object library is just a bunch of .o files. Linking them with
main.c or
inkview.c# we get the inkscape and inkview executables respectively.
add_library(inkscape_base OBJECT ${inkscape_SRC} ${sp_SRC})
# make executables for inkscape and inkview
add_executable(inkscape ${main_SRC} $<TARGET_OBJECTS:inkscape_base>)
add_executable(inkview
inkview.cpp $<TARGET_OBJECTS:inkscape_base>)
# message after building.
POST_BUILD MAIN_DEPENDENCY inkscape
COMMAND ${CMAKE_COMMAND} -E echo 'now run: \"make install\" to copy runtime files & scripts to ${CMAKE_INSTALL_PREFIX}'
add_dependencies(inkscape inkscape_version)
if (NOT "${WITH_EXT_GDL}")
list (APPEND INKSCAPE_LIBS "gdl_LIB")
#sp_LIB # annoying, we need both!
nrtype_LIB # annoying, we need both!
target_link_libraries(inkscape ${INKSCAPE_TARGET_LIBS})
target_link_libraries(inkview ${INKSCAPE_TARGET_LIBS})