In January 2021 we will introduce a 10 GB quota for project repositories. Higher limits for individual projects will be available on request. Please see https://doku.lrz.de/display/PUBLIC/GitLab for more information.

CMakeLists.txt 1.96 KB
Newer Older
schultezub's avatar
schultezub committed
1
PROJECT(campvis-core)
schultezub's avatar
schultezub committed
2
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
3
INCLUDE(../cmake/commonconf.cmake)
schultezub's avatar
schultezub committed
4

5
MESSAGE(STATUS "Configuring CAMPVis-Core")
schultezub's avatar
schultezub committed
6

7
# glob sources from core directories
schultezub's avatar
schultezub committed
8
FILE(GLOB CampvisCoreSources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
9
    *.cpp
10
    classification/*.cpp
schultezub's avatar
schultezub committed
11
    datastructures/*.cpp
schultezub's avatar
schultezub committed
12
    eventhandlers/*.cpp
13
    pipeline/*.cpp
schultezub's avatar
schultezub committed
14
    properties/*.cpp
schultezub's avatar
schultezub committed
15
    tools/*.cpp
schultezub's avatar
schultezub committed
16 17
)

18 19 20 21 22 23 24 25
# add additional sources from the activated modules
FOREACH(CampvisModulesCoreSource ${CampvisModulesCoreSources})
    # adjust relative path
    SET(ModCoreFile ../modules/${CampvisModulesCoreSource})
    LIST(APPEND CampvisCoreSources ${ModCoreFile})
ENDFOREACH()


schultezub's avatar
schultezub committed
26
FILE(GLOB CampvisCoreHeaders RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
27
    *.h
28
    classification/*.h
schultezub's avatar
schultezub committed
29
    datastructures/*.h
schultezub's avatar
schultezub committed
30
    eventhandlers/*.h
31
    pipeline/*.h
schultezub's avatar
schultezub committed
32
    properties/*.h
schultezub's avatar
schultezub committed
33 34 35 36 37
    tools/*.h
    glsl/*.vert
    glsl/*.frag
    glsl/tools/*.vert
    glsl/tools/*.frag
schultezub's avatar
schultezub committed
38 39
)

40 41 42 43 44 45 46
# add additional sources from the activated modules
FOREACH(CampvisModulesCoreHeader ${CampvisModulesCoreHeaders})
    # adjust relative path
    SET(ModHeaderFile ../modules/${CampvisModulesCoreHeader})
    LIST(APPEND CampvisCoreHeaders ${ModHeaderFile})
ENDFOREACH()

schultezub's avatar
schultezub committed
47
ADD_LIBRARY(campvis-core 
schultezub's avatar
schultezub committed
48
    ${CampvisCoreSources} ${CampvisCoreHeaders} 
schultezub's avatar
 
schultezub committed
49
)
50
ADD_DEFINITIONS(${CampvisGlobalDefinitions})
schultezub's avatar
schultezub committed
51
INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs})
52
TARGET_LINK_LIBRARIES(campvis-core cgt sigslot ${CampvisGlobalExternalLibs})
53

54 55 56 57
# if campvis-core is built as a shared library, CMake will define the following flag to instruct
# the code to export DLL symbols
SET_TARGET_PROPERTIES(campvis-core PROPERTIES DEFINE_SYMBOL "CAMPVIS_CORE_BUILD_DLL")

58 59 60
IF(CAMPVIS_GROUP_SOURCE_FILES)
    DEFINE_SOURCE_GROUPS_FROM_SUBDIR(CampvisCoreSources ${CampvisHome} "")
    DEFINE_SOURCE_GROUPS_FROM_SUBDIR(CampvisCoreHeaders ${CampvisHome} "")
61
ENDIF()
62 63 64


INSTALL(TARGETS campvis-core DESTINATION exports EXPORT campvis-targets)