CMakeLists.txt revision 20e2b77b5ec3e16afda325101a664b8136d7fb62
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspikeSET(INKSCAPE_SRC)
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike# A macro to replace slashes and spaces in a string with underscores
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspikeMACRO(SANITIZE_PATH _string_var)
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike STRING(REGEX REPLACE "[\\/ ]+" "_" ${_string_var} ${${_string_var}})
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspikeENDMACRO(SANITIZE_PATH _string_var)
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike# A macro to prepend a given string onto the beginning of each string in a list
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspikeMACRO(PREPEND _list _str)
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike SET(_temp_list ${${_list}})
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike SET(${_list})
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike FOREACH(x ${_temp_list})
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike SET(${_list} ${${_list}} ${_str}${x})
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike ENDFOREACH(x)
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspikeENDMACRO(PREPEND _list _str)
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike# All folder with CMakeLists.txt files (excluding internal libraries)
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspikeSET(srcfolders
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspikejabber_whiteboard
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspikelive_effects
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspikeremoveoverlap
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike# 1) include each list file
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike# 2) grab the variable inside
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike# 3) prepend the full relative path to each file in list
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike# 4) append the list to INKSCAPE_SRC
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspikeFOREACH(dirlist ${srcfolders})
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike SET(_temp_dirlist "${dirlist}")
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike MESSAGE(STATUS "Processing ${CMAKE_CURRENT_SOURCE_DIR}/${dirlist}/CMakeLists.txt")
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/${dirlist}/CMakeLists.txt)
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike SANITIZE_PATH(dirlist)
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike PREPEND(${dirlist}_SRC "${_temp_dirlist}/")
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike SET(INKSCAPE_SRC ${INKSCAPE_SRC} ${${dirlist}_SRC})
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspikeENDFOREACH(dirlist)
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike# All directories containing lists files that describe building internal libraries
d89841792f96d922001765f5ec7e84fe0ab02539verbalshadowSET(libfolders
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspikeFOREACH(dirlist ${libfolders})
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike ADD_SUBDIRECTORY(${dirlist})
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspikeENDFOREACH(dirlist)
ff062a2768af33d794327e053abbb40f548545b8johanengelenELSEIF(WIN32)
ff062a2768af33d794327e053abbb40f548545b8johanengelenSET(ONLY_WIN)
ff062a2768af33d794327e053abbb40f548545b8johanengelenSET(INKSCAPE_SRC
2cdfe79be9449f74ac43a83b6ae7fb62f45c484bacspike${INKSCAPE_SRC}
f79096fa559ff21d316e9f2561d982ba25b70986verbalshadowjabber_whiteboard
ff062a2768af33d794327e053abbb40f548545b8johanengelen# make executable for INKSCAPE
ff062a2768af33d794327e053abbb40f548545b8johanengelenADD_EXECUTABLE(inkscape ${INKSCAPE_SRC})
ff062a2768af33d794327e053abbb40f548545b8johanengelenTARGET_LINK_LIBRARIES(inkscape
ccaa842a0dc9cbeb8214cf55f3b454713f084477verbalshadow "${INKSCAPE_LINK_FLAGS}" 2geom avoid cola croco gdl nr nrtype vpsc livarot
d9193e62c7b56f295e16cf2212401cff13ad254everbalshadow# make executable for INKVIEW
20e2b77b5ec3e16afda325101a664b8136d7fb62verbalshadow#ADD_EXECUTABLE(inkview inkview.cpp)
20e2b77b5ec3e16afda325101a664b8136d7fb62verbalshadow#TARGET_LINK_LIBRARIES(inkview
20e2b77b5ec3e16afda325101a664b8136d7fb62verbalshadow# "${INKSCAPE_LINK_FLAGS}" 2geom avoid cola croco gdl nr nrtype vpsc livarot