CMakeLists.txt 2.37 KB
Newer Older
promayon's avatar
promayon committed
1
#--------------------------------------------
2
#
3
#      CamiTK Community Edition CEP Set
4
#
Maxime Calka's avatar
Maxime Calka committed
5
#-------------------------------------------- 
6
cmake_minimum_required(VERSION 3.0)
7

8
project(camitkcommunityedition)
9

10
# Allow testing of the whole camitk-communityedition project
11 12 13
include(CTest)
enable_testing()

14
set(CAMITK_PROJECT_NAME "CamiTK")
15 16
# The current version of CamiTK is defined in a separate file to avoid conflict/problem when merging
include(CamiTKVersion.cmake)
17
string(TOLOWER "${CAMITK_PROJECT_NAME}-${CAMITK_VERSION_MAJOR}.${CAMITK_VERSION_MINOR}" CAMITK_SHORT_VERSION_STRING)
18

19 20
# Specific to the Community Edition: this is the Community Edition build
set(CAMITK_COMMUNITY_EDITION_BUILD TRUE)
21

promayon's avatar
promayon committed
22 23
#-- This is a CEP set...
set(CAMITK_EXTENSION_PROJECT_SET TRUE CACHE BOOL "Is this a CamiTK Extension Project Set?")
24
set(CAMITK_EXTENSION_PROJECT_SET_NAME "camitk-communityedition" CACHE STRING "CEP Set Name")
25

26
# Configure CamiTK Community Edition packaging.
27
# Must be done before parsing extensions CMakeLists.txt files.
28
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/sdk/cmake/modules/macros ${CMAKE_CURRENT_SOURCE_DIR}/sdk/cmake/modules)
lealv's avatar
lealv committed
29
set(CAMITK_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
30 31
include(camitk/packaging/CamiTKCommunityEditionPackaging)
camitk_communityedition_packaging()
saubatn's avatar
saubatn committed
32

33 34 35
# Configure include-what-you-use to check the current target
include(camitk/test/CamiTKIncludeWhatYouUse)

Emmanuel Promayon's avatar
Emmanuel Promayon committed
36
# CamiTK requires C++11
37 38 39 40 41 42
if(${CMAKE_VERSION} VERSION_LESS "3.1.3")
    # On MSVC C++11 is the default
    if(UNIX)
        # CMAKE_CXX_STANDARD not available for cmake 3.0.2 (as in debian old stable)
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
    endif()
43 44 45 46
else()
    # All target after this declaration will be compile with c++11 policy
    set(CMAKE_CXX_STANDARD 11)
endif()
47

48 49
# Specific to SDK: first compile the SDK (it looks like a CEP but is sooooo special...)
add_subdirectory(sdk)
50

51
# ...composed by the following CamiTK Extension Projects (optional)
promayon's avatar
promayon committed
52
add_subdirectory(imaging)
53 54
add_subdirectory(modeling)

55 56 57
# ... and tutorials that helps understand CamiTK (optional)
add_subdirectory(tutorials)

Jean-Loup Haberbusch's avatar
Jean-Loup Haberbusch committed
58

saubatn's avatar
saubatn committed
59 60 61 62 63 64 65 66
# Do we wrapp CamiTK for scripting it into Python using Shiboken and PySide ?
set(CAMITK_BINDING_PYTHON CACHE BOOL FALSE)

# Consider python binding only if the CMake variable is checked
if(CAMITK_BINDING_PYTHON)
    add_subdirectory(python_sdk)
endif()

67

68
camitk_write_manifest_data(CEP_SET)