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.91 KB
Newer Older
schultezub's avatar
schultezub committed
1
PROJECT(campvis-core)
2
INCLUDE(../cmake/commonconf.cmake)
schultezub's avatar
schultezub committed
3

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

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

17 18 19 20 21 22 23 24
# 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
25
FILE(GLOB CampvisCoreHeaders RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
26
    *.h
27
    classification/*.h
schultezub's avatar
schultezub committed
28
    datastructures/*.h
schultezub's avatar
schultezub committed
29
    eventhandlers/*.h
30
    pipeline/*.h
schultezub's avatar
schultezub committed
31
    properties/*.h
schultezub's avatar
schultezub committed
32 33 34 35 36
    tools/*.h
    glsl/*.vert
    glsl/*.frag
    glsl/tools/*.vert
    glsl/tools/*.frag
schultezub's avatar
schultezub committed
37 38
)

39 40 41 42 43 44 45
# 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
46
ADD_LIBRARY(campvis-core 
schultezub's avatar
schultezub committed
47
    ${CampvisCoreSources} ${CampvisCoreHeaders} 
schultezub's avatar
 
schultezub committed
48
)
49
ADD_DEFINITIONS(${CampvisGlobalDefinitions})
schultezub's avatar
schultezub committed
50
INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs})
51
TARGET_LINK_LIBRARIES(campvis-core cgt sigslot ${CampvisGlobalExternalLibs})
52

53 54 55 56
# 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")

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


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