CMakeLists.txt revision 75a9e9a452df552fafffef74ea9e9a6998073bf5
# -----------------------------------------------------------------------------
# Define the main source
# -----------------------------------------------------------------------------
set(main_SRC
)
set(sp_SRC
# -------
# Headers
)
set(inkscape_SRC
# -------
# Headers
)
if(WIN32)
list(APPEND inkscape_SRC
)
endif()
# -----------------------------------------------------------------------------
# Generate version file
# -----------------------------------------------------------------------------
# a custom target that is always built
add_custom_target(
inkscape_version ALL
DEPENDS ${CMAKE_BINARY_DIR}/src/inkscape-version.cpp)
# creates inkscape-version.cpp using cmake script
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/src/inkscape-version.cpp
COMMAND ${CMAKE_COMMAND}
-DINKSCAPE_SOURCE_DIR=${CMAKE_SOURCE_DIR}
-DINKSCAPE_BINARY_DIR=${CMAKE_BINARY_DIR}
-P ${CMAKE_SOURCE_DIR}/CMakeScripts/inkscape-version.cmake)
# buildinfo.h is a generated file
set_source_files_properties(
${CMAKE_BINARY_DIR}/src/inkscape-version.cpp
PROPERTIES GENERATED TRUE)
list(APPEND inkscape_SRC
${CMAKE_BINARY_DIR}/src/inkscape-version.cpp
)
# -----------------------------------------------------------------------------
# Load in subdirectories
# -----------------------------------------------------------------------------
# All folders for internal inkscape
# these call add_inkscape_source
add_subdirectory(debug)
add_subdirectory(dialogs)
add_subdirectory(display)
add_subdirectory(dom)
add_subdirectory(extension)
add_subdirectory(filters)
add_subdirectory(helper)
add_subdirectory(io)
add_subdirectory(live_effects)
add_subdirectory(svg)
add_subdirectory(trace)
add_subdirectory(ui)
add_subdirectory(util)
add_subdirectory(widgets)
add_subdirectory(xml)
add_subdirectory(2geom)
# Directories containing lists files that describe building internal libraries
add_subdirectory(libavoid)
add_subdirectory(libcola)
add_subdirectory(libcroco)
add_subdirectory(libgdl)
add_subdirectory(libvpsc)
add_subdirectory(livarot)
add_subdirectory(libnrtype)
get_property(inkscape_global_SRC GLOBAL PROPERTY inkscape_global_SRC)
set(inkscape_SRC
${inkscape_global_SRC}
${inkscape_SRC}
)
# -----------------------------------------------------------------------------
# Setup the executable
# -----------------------------------------------------------------------------
add_inkscape_lib(sp_LIB "${sp_SRC}")
add_inkscape_lib(inkscape_LIB "${inkscape_SRC}")
# make executable for INKSCAPE
add_executable(inkscape ${main_SRC})
add_dependencies(inkscape inkscape_version)
target_link_libraries(inkscape
# order from automake
sp_LIB
nrtype_LIB
inkscape_LIB
sp_LIB # annoying, we need both!
nrtype_LIB # annoying, we need both!
dom_LIB
croco_LIB
avoid_LIB
gdl_LIB
cola_LIB
vpsc_LIB
livarot_LIB
2geom_LIB
${INKSCAPE_LIBS}
)
# TODO
# make executable for INKVIEW
#add_executable(inkview inkview.cpp)
# ...