CMakeLists.txt 2.84 KB
Newer Older
Sylvain Thery's avatar
Sylvain Thery committed
1
2
cmake_minimum_required(VERSION 2.8)

Sylvain Thery's avatar
Sylvain Thery committed
3
4
5
project(SCHNAppsLib)

IF(WIN32 AND (NOT (CGoGN_WITH_QTCREATOR)))
Sylvain Thery's avatar
Sylvain Thery committed
6
	file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/plugins_default_directory.h 
7
	\#define\ PLUGINS_DEFAULT_DIRECTORY\ \"${SCHNApps_ROOT_DIR}/lib/plugins/\" )
Sylvain Thery's avatar
Sylvain Thery committed
8
9
ELSE()
	file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/plugins_default_directory.h 
10
11
12
13
14
15
16
17
18
19
20
21
22
23
	\#define\ PLUGINS_DEFAULT_DIRECTORY\ \"${SCHNApps_ROOT_DIR}/lib/plugins/${CMAKE_BUILD_TYPE}\" )
ENDIF()

IF(WIN32)
	IF (CGoGN_WITH_QTCREATOR)
		SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE})
		link_directories( ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE} )
	ELSE()
		SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin)
		link_directories( ${CGoGN_ROOT_DIR}/bin/${ConfigurationName} )
	ENDIF()
ELSE()
	SET(LIBRARY_OUTPUT_PATH ${SCHNApps_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE})
	link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} )
Sylvain Thery's avatar
Sylvain Thery committed
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
ENDIF()

# SCHNApps files to compile in a lib for dll access from plugins
file(
	GLOB_RECURSE
	SCHNAppsLib_FILES	
	${SCHNApps_ROOT_DIR}/src/camera.cpp
	${SCHNApps_ROOT_DIR}/src/cellSelector.cpp
	${SCHNApps_ROOT_DIR}/src/colorComboBox.cpp
	${SCHNApps_ROOT_DIR}/src/controlDock_cameraTab.cpp
	${SCHNApps_ROOT_DIR}/src/controlDock_mapTab.cpp
	${SCHNApps_ROOT_DIR}/src/controlDock_pluginTab.cpp
	${SCHNApps_ROOT_DIR}/src/dialogList.cpp
	${SCHNApps_ROOT_DIR}/src/mapHandler.cpp
	${SCHNApps_ROOT_DIR}/src/plugin.cpp
	${SCHNApps_ROOT_DIR}/src/plugin_interaction.cpp
	${SCHNApps_ROOT_DIR}/src/plugin_processing.cpp
	${SCHNApps_ROOT_DIR}/src/schnapps.cpp
	${SCHNApps_ROOT_DIR}/src/slot_debug.cpp
	${SCHNApps_ROOT_DIR}/src/view.cpp
	${SCHNApps_ROOT_DIR}/src/viewButtonArea.cpp
	${SCHNApps_ROOT_DIR}/include/*.h
	${SCHNApps_ROOT_DIR}/include/*.hpp
)

file(
	GLOB_RECURSE
	SCHNAppsLib_UI_FILES
	${SCHNApps_ROOT_DIR}/forms/*.ui
)

SET(SCHNAppsLib_QOBJECT_FILES
	${SCHNApps_ROOT_DIR}/include/camera.h
	${SCHNApps_ROOT_DIR}/include/mapHandler.h
	${SCHNApps_ROOT_DIR}/include/cellSelector.h
	${SCHNApps_ROOT_DIR}/include/plugin.h
	${SCHNApps_ROOT_DIR}/include/plugin_interaction.h
	${SCHNApps_ROOT_DIR}/include/plugin_processing.h
	${SCHNApps_ROOT_DIR}/include/view.h
	${SCHNApps_ROOT_DIR}/include/schnapps.h
	${SCHNApps_ROOT_DIR}/include/viewButtonArea.h
	${SCHNApps_ROOT_DIR}/include/controlDock_cameraTab.h
	${SCHNApps_ROOT_DIR}/include/controlDock_pluginTab.h
	${SCHNApps_ROOT_DIR}/include/controlDock_mapTab.h
	${SCHNApps_ROOT_DIR}/include/colorComboBox.h
	${SCHNApps_ROOT_DIR}/include/dialogList.h
)

Sylvain Thery's avatar
Sylvain Thery committed
72
qt_wrap_ui( UIC_FILES
Sylvain Thery's avatar
Sylvain Thery committed
73
74
75
	${SCHNAppsLib_UI_FILES}
)

Sylvain Thery's avatar
Sylvain Thery committed
76
qt_wrap_cpp( MOC_FILES
Sylvain Thery's avatar
Sylvain Thery committed
77
78
79
	${SCHNAppsLib_QOBJECT_FILES}
)

Sylvain Thery's avatar
Sylvain Thery committed
80
qt_add_resources( RCC_FILES
Sylvain Thery's avatar
Sylvain Thery committed
81
82
83
	${SCHNApps_ROOT_DIR}/resources/resources.qrc
)

Sylvain Thery's avatar
Sylvain Thery committed
84
ADD_DEFINITIONS(-DSCHNAPPSLIB_DLL_EXPORT)
Sylvain Thery's avatar
Sylvain Thery committed
85
86
87
88
89
90
91
92
93
94
95

ADD_LIBRARY( SCHNAppsLib SHARED
	${SCHNAppsLib_FILES}
	${UIC_FILES}
	${MOC_FILES}
	${RCC_FILES}
)
TARGET_LINK_LIBRARIES( SCHNAppsLib
	${CGoGN_LIBS}
	${EXT_LIBS}
)
Sylvain Thery's avatar
Sylvain Thery committed
96

97
qt_use_modules(SCHNAppsLib Core Gui OpenGL Xml Svg)