CMakeLists.txt 1.8 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

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

7
8
9
10
11
12
13
14
# configuration
IF(CAMPVIS_SHARED_LIBS)
    SET(BUILD_SHARED_LIBS TRUE)
	IF(MSVC)
		ADD_DEFINITIONS("-DCAMPVIS_CORE_BUILD_DLL")
	ENDIF()	
ENDIF()

15
# glob sources from core directories
schultezub's avatar
schultezub committed
16
FILE(GLOB CampvisCoreSources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
17
    classification/*.cpp
schultezub's avatar
schultezub committed
18
    datastructures/*.cpp
schultezub's avatar
schultezub committed
19
    eventhandlers/*.cpp
20
    pipeline/*.cpp
schultezub's avatar
schultezub committed
21
    properties/*.cpp
schultezub's avatar
schultezub committed
22
    tools/*.cpp
schultezub's avatar
schultezub committed
23
24
)

25
26
27
28
29
30
31
32
# 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
33
FILE(GLOB CampvisCoreHeaders RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
34
    *.h
35
    classification/*.h
schultezub's avatar
schultezub committed
36
    datastructures/*.h
schultezub's avatar
schultezub committed
37
    eventhandlers/*.h
38
    pipeline/*.h
schultezub's avatar
schultezub committed
39
    properties/*.h
schultezub's avatar
schultezub committed
40
41
42
43
44
    tools/*.h
    glsl/*.vert
    glsl/*.frag
    glsl/tools/*.vert
    glsl/tools/*.frag
schultezub's avatar
schultezub committed
45
46
)

47
48
49
50
51
52
53
# 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
54
ADD_LIBRARY(campvis-core 
schultezub's avatar
schultezub committed
55
    ${CampvisCoreSources} ${CampvisCoreHeaders} 
schultezub's avatar
   
schultezub committed
56
)
57
ADD_DEFINITIONS(${CampvisGlobalDefinitions})
schultezub's avatar
schultezub committed
58
INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs})
59
TARGET_LINK_LIBRARIES(campvis-core tgt ${CampvisGlobalExternalLibs})
60
61
62
63
64
65


IF(CAMPVIS_GROUP_SOURCE_FILES)
    DEFINE_SOURCE_GROUPS_FROM_SUBDIR(CampvisCoreSources ${CampvisHome} "")
    DEFINE_SOURCE_GROUPS_FROM_SUBDIR(CampvisCoreHeaders ${CampvisHome} "")
ENDIF()