CMakeLists.txt 2.86 KB
Newer Older
Sylvain Thery's avatar
Sylvain Thery committed
1
cmake_minimum_required(VERSION 2.8)
Pierre Kraemer's avatar
Pierre Kraemer committed
2 3 4 5 6

project(CGoGNDebug)

SET(CMAKE_BUILD_TYPE Debug)

thery's avatar
thery committed
7 8 9 10 11 12
IF(WIN32)
	SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib)
ELSE(WIN32)
	SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/Debug)
ENDIF(WIN32)

Pierre Kraemer's avatar
Pierre Kraemer committed
13 14

include_directories(
15
	${CMAKE_CURRENT_BINARY_DIR}
Pierre Kraemer's avatar
Pierre Kraemer committed
16
	${CGoGN_ROOT_DIR}/include
Sylvain Thery's avatar
Sylvain Thery committed
17
	${CGoGN_EXT_INCLUDES}
Pierre Kraemer's avatar
Pierre Kraemer committed
18 19
)

Sylvain Thery's avatar
Sylvain Thery committed
20

Pierre Kraemer's avatar
Pierre Kraemer committed
21 22 23 24 25 26 27
file(
	GLOB_RECURSE
	files_topology
	${CGoGN_ROOT_DIR}/src/Topology/*.cpp
	${CGoGN_ROOT_DIR}/include/Topology/*.hpp
	${CGoGN_ROOT_DIR}/include/Topology/*.h
)
28

Pierre Kraemer's avatar
Pierre Kraemer committed
29 30 31 32 33 34 35 36

file(
	GLOB_RECURSE
	files_container
	${CGoGN_ROOT_DIR}/src/Container/*.cpp
	${CGoGN_ROOT_DIR}/include/Container/*.hpp
	${CGoGN_ROOT_DIR}/include/Container/*.h
)
37

Pierre Kraemer's avatar
Pierre Kraemer committed
38 39 40 41 42 43 44 45 46 47

file(
	GLOB_RECURSE
	files_algo
	${CGoGN_ROOT_DIR}/src/Algo/*.cpp
	${CGoGN_ROOT_DIR}/src/Algo/*.c
	${CGoGN_ROOT_DIR}/include/Algo/*.hpp
	${CGoGN_ROOT_DIR}/include/Algo/*.h
)

48 49

file(
Sylvain Thery's avatar
Sylvain Thery committed
50 51
#	GLOB_RECURSE
	GLOB
52 53 54 55
	shaders_srcD
	${CGoGN_ROOT_DIR}/include/Utils/*.frag
	${CGoGN_ROOT_DIR}/include/Utils/*.vert
	${CGoGN_ROOT_DIR}/include/Utils/*.geom	
Sylvain Thery's avatar
Sylvain Thery committed
56 57 58
	${CGoGN_ROOT_DIR}/include/Utils/Shaders/*.frag
	${CGoGN_ROOT_DIR}/include/Utils/Shaders/*.vert
	${CGoGN_ROOT_DIR}/include/Utils/Shaders/*.geom
59 60
)

Sylvain Thery's avatar
Sylvain Thery committed
61
IF(WIN32)
Sylvain Thery's avatar
Sylvain Thery committed
62
	add_custom_target(shader_targetD ${CGoGN_ROOT_DIR}/ThirdParty/bin/Release/shader_to_h ${shaders_srcD}
63
	WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
Sylvain Thery's avatar
Sylvain Thery committed
64
	SOURCES ${shaders_srcD} )
Sylvain Thery's avatar
Sylvain Thery committed
65
ELSE(WIN32)
Sylvain Thery's avatar
Sylvain Thery committed
66
	add_custom_target(shader_targetD ${CGoGN_ROOT_DIR}/ThirdParty/bin/shader_to_h ${shaders_srcD}
Sylvain Thery's avatar
Sylvain Thery committed
67 68 69 70 71
	WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
	SOURCES ${shaders_srcD} 
)
ENDIF(WIN32)

Pierre Kraemer's avatar
Pierre Kraemer committed
72 73 74


file(
Sylvain Thery's avatar
Sylvain Thery committed
75
	GLOB		# WARNING NO MORE RECURSE TO AVOID TAKING QT FILES
Pierre Kraemer's avatar
Pierre Kraemer committed
76 77 78 79
	files_utils
	${CGoGN_ROOT_DIR}/src/Utils/*.cpp
	${CGoGN_ROOT_DIR}/include/Utils/*.hpp
	${CGoGN_ROOT_DIR}/include/Utils/*.h
Sylvain Thery's avatar
Sylvain Thery committed
80 81 82 83
	
	${CGoGN_ROOT_DIR}/src/Utils/Shaders/*.cpp
	${CGoGN_ROOT_DIR}/include/Utils/Shaders/*.hpp
	${CGoGN_ROOT_DIR}/include/Utils/Shaders/*.h
Pierre Kraemer's avatar
Pierre Kraemer committed
84
)
Sylvain Thery's avatar
Sylvain Thery committed
85

86 87 88 89 90 91 92 93 94 95
IF(WITH_QT)
	file(
		GLOB
		files_utils_qt
		${CGoGN_ROOT_DIR}/src/Utils/Qt/*.cpp
		${CGoGN_ROOT_DIR}/include/Utils/Qt/*.hpp
		${CGoGN_ROOT_DIR}/include/Utils/Qt/*.h )
	file(
		GLOB_RECURSE
		utils_qt_headers
96 97
		${CGoGN_ROOT_DIR}/include/Utils/Qt/qtgl.h
		${CGoGN_ROOT_DIR}/include/Utils/Qt/qtSimple.h )
98 99 100 101
		
	QT4_WRAP_CPP(UTILS_QT_HEADERS_MOC ${utils_qt_headers})
	SET (files_utils_withQt ${files_utils} ${files_utils_qt} ${UTILS_QT_HEADERS_MOC})
ENDIF (WITH_QT)
Sylvain Thery's avatar
Sylvain Thery committed
102

Pierre Kraemer's avatar
Pierre Kraemer committed
103

Sylvain Thery's avatar
Sylvain Thery committed
104

105 106 107 108 109 110 111

IF (ONELIB)
	IF(WITH_QT)
		add_library( cgognD ${files_topology} ${files_container} ${files_algo} ${files_utils_withQt}) 
	ELSE(WITH_QT)
		add_library( cgognD ${files_topology} ${files_container} ${files_algo} ${files_utils} )
	ENDIF (WITH_QT)
Sylvain Thery's avatar
Sylvain Thery committed
112
	add_dependencies(cgognD shader_targetD )
113 114 115 116 117 118 119 120 121 122
ELSE (ONELIB)
	add_library( topologyD	${files_topology})
	add_library( containerD	${files_container})
	add_library( algoD		${files_algo})
	IF(WITH_QT)
		add_library( utilsD ${files_utils_withQt} )
	ELSE(WITH_QT)
		add_library( utilsD ${files_utils} )
	ENDIF (WITH_QT)
	add_dependencies(utilsD shader_targetD )
Sylvain Thery's avatar
Sylvain Thery committed
123
ENDIF (ONELIB)