1 # ---------------------------------
3 # Unless you are an experimented cmake user,
5 # http://www.creatis.insa-lyon.fr/site/fr/CreatoosGettingStarted-v2.0.X
7 # ---------------------------------
9 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
12 INCLUDE(Version.cmake)
14 SET(CREA_LIBRARY_PROPERTIES ${CREA_LIBRARY_PROPERTIES}
15 VERSION "${crea_MAJOR_VERSION}.${crea_MINOR_VERSION}.${crea_BUILD_VERSION}"
16 SOVERSION "${crea_MAJOR_VERSION}.${crea_MINOR_VERSION}.${crea_BUILD_VERSION}"
19 SET(CREA_VERBOSE_CMAKE TRUE)
20 SET(CREA_CMAKE_REL_PATH cmake)
21 SET(CREA_CMAKE_DIR ${PROJECT_SOURCE_DIR}/${CREA_CMAKE_REL_PATH})
22 INCLUDE(${CREA_CMAKE_DIR}/CREACMakeSettings.cmake NO_POLICY_SCOPE)
23 INCLUDE(${CREA_CMAKE_DIR}/CREAMacros.cmake)
26 CREA_PREVENT_IN_SOURCE_BUILD()
29 OPTION(CREA_BUILD_VTK "Build crea with vtk ?" OFF)
32 SET(CREA_BUILT_WITH_VTK ON)
35 OPTION(CREA_BUILD_WX "Build crea with wxWidgets ?" OFF)
38 SET(CREA_BUILT_WITH_WX ON)
42 set (CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/cmake/Module)
45 CREA_FIND_AND_USE_LIBRARIES()
46 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
47 SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
48 SET(CREA_LIB_PATH ${CMAKE_CREA_LIB_PATH} )
51 CMAKE_BACKWARDS_COMPATIBILITY
52 EXECUTABLE_OUTPUT_PATH
56 SET (BOOST_FILESYSTEM_VERSION 2)
58 #-----------------------------------------------------------------------------
59 # messages compilation options
61 OPTION ( CREA_COMPILE_DEBUG_MESSAGES "Compile CREA debug messages ?" USE_DEBUG_LIB)
62 OPTION ( CREA_COMPILE_ERROR_MESSAGES "Compile CREA error messages ?" ON)
63 OPTION ( CREA_COMPILE_MESSAGES "Compile CREA messages ?" ON)
64 OPTION ( CREA_COMPILE_WARNING_MESSAGES "Compile CREA warning messages ?" ON)
65 #-----------------------------------------------------------------------------
67 INCLUDE(${CREA_CMAKE_DIR}/CREAResolveOptions.cmake)
69 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
70 INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/src)
73 INCLUDE_DIRECTORIES(/usr/lib/x86_64-linux-gnu/glib-2.0/include/)
76 ADD_SUBDIRECTORY(cmake)
78 ADD_SUBDIRECTORY(appli)
79 #-----------------------------------------------------------------------------
80 OPTION( BUILD_SAMPLES "Build samples ?" OFF)
82 ADD_SUBDIRECTORY(samples)
84 #-----------------------------------------------------------------------------
86 ADD_SUBDIRECTORY(install)