diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ PROJECT(${PROJECT_NAME}) -SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) +SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) INCLUDE(FindDoxygen) INCLUDE(FindGhostscript) @@ -38,10 +38,12 @@ ENABLE_TESTING() ADD_SUBDIRECTORY(lemon) -ADD_SUBDIRECTORY(demo) -ADD_SUBDIRECTORY(tools) -ADD_SUBDIRECTORY(doc) -ADD_SUBDIRECTORY(test) +IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) + ADD_SUBDIRECTORY(demo) + ADD_SUBDIRECTORY(tools) + ADD_SUBDIRECTORY(doc) + ADD_SUBDIRECTORY(test) +ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) IF(WIN32) SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})