CMakeLists.txt revision 4355211b8f2c460da655d4b71445e69495aecc49
IF(WIN32)
SET(ONLY_WIN
ELSEIF(WIN32)
SET(ONLY_WIN)
ENDIF(WIN32)
SET(SP_SRC
)
SET(INKSCAPE_SRC
extension
jabber_whiteboard
${ONLY_WIN}
)
# All folder with CMakeLists.txt files (excluding internal libraries)
SET(srcfolders
algorithms
api
application
bind
debug
dialogs
display
dom
extension
graphlayout
helper
inkjar
io
jabber_whiteboard
live_effects
pedro
removeoverlap
svg
trace
traits
ui
#utest
util
widgets
xml
)
# 1) include each list file
# 2) grab the variable inside
# 3) prepend the full relative path to each file in list
# 4) append the list to INKSCAPE_SRC
FOREACH(dirlist ${srcfolders})
SET(_temp_dirlist "${dirlist}")
MESSAGE(STATUS "Processing ${CMAKE_CURRENT_SOURCE_DIR}/${dirlist}/CMakeLists.txt")
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/${dirlist}/CMakeLists.txt)
SANITIZE_PATH(dirlist)
PREPEND(${dirlist}_SRC "${_temp_dirlist}/")
SET(INKSCAPE_SRC ${INKSCAPE_SRC} ${${dirlist}_SRC})
ENDFOREACH(dirlist)
SET(INKSCAPE_SRC ${INKSCAPE_SRC} ${GlibOutput})
# All directories containing lists files that describe building internal libraries
SET(libfolders
2geom
libavoid
libcola
libcroco
libgdl
libnr
libnrtype
libvpsc
livarot
)
FOREACH(dirlistsrc ${libfolders})
ADD_SUBDIRECTORY(${dirlistsrc})
ENDFOREACH(dirlistsrc)
ADD_LIBRARY(sp STATIC ${SP_SRC})
# make executable for INKSCAPE
ADD_EXECUTABLE(inkscape ${INKSCAPE_SRC})
TARGET_LINK_LIBRARIES(inkscape
"${INKSCAPE_LIBS}" 2geom avoid cola croco gdl nr nrtype vpsc livarot sp
)
# make executable for INKVIEW
#ADD_EXECUTABLE(inkview inkview.cpp)
#TARGET_LINK_LIBRARIES(inkview
# "${INKSCAPE_LINK_FLAGS}" 2geom avoid cola croco gdl nr nrtype vpsc livarot sp
#)