CMakeLists.txt 1.73 KB
Newer Older
1
2
cmake_minimum_required(VERSION 2.6)

Pierre Kraemer's avatar
Pierre Kraemer committed
3
4
project(CGoGN_ThirdParty)

5
SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/..)
unknown's avatar
unknown committed
6
7
8
9
10
11
12

IF(WIN32)
	set(CMAKE_PREFIX_PATH ${CGoGN_ROOT_DIR}/windows_dependencies CACHE STRING "path to dependencies")
ENDIF(WIN32)

IF (${CMAKE_CURRENT_BINARY_DIR} MATCHES "(.*)Debug")
	SET(CMAKE_BUILD_TYPE Debug)
13
14
ELSE (${CMAKE_CURRENT_BINARY_DIR} MATCHES "(.*)Debug")
	SET(CMAKE_BUILD_TYPE Release)
unknown's avatar
unknown committed
15
16
17
18
19
20
21
22
23
24
ENDIF (${CMAKE_CURRENT_BINARY_DIR} MATCHES "(.*)Debug")

IF(WIN32)
	SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib)#release added by visual
	INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/include/)
ELSE(WIN32)
	SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE})
ENDIF(WIN32)


Sylvain Thery's avatar
Sylvain Thery committed
25
26
# for shared or not shared
SET (BUILD_SHARED_LIBS OFF CACHE BOOL 
27
	"if used all library are build as shared type (.so/.dylib/.dll)")
Sylvain Thery's avatar
Sylvain Thery committed
28

29
30
SET (WITH_ASSIMP ON CACHE BOOL "build with Assimp")
SET (WITH_ZINRI ON CACHE BOOL "build with Zinri libs")
Sylvain Thery's avatar
Sylvain Thery committed
31

32
33
34
IF (APPLE)
	SET(CMAKE_OSX_ARCHITECTURES x86_64)
ENDIF(APPLE)
35

Pierre Kraemer's avatar
Pierre Kraemer committed
36

37

38
39
add_subdirectory(Tools Tools/build)

40
41
42
add_subdirectory(PythonQt PythonQt/build)
INSTALL (DIRECTORY PythonQt/src/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/PythonQt FILES_MATCHING PATTERN "*.h")

43
44
IF (WITH_ZINRI)
	add_subdirectory(Zinri Zinri/build)
45
	INSTALL (DIRECTORY Zinri/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/Zinri FILES_MATCHING PATTERN "*.h")
46
47
ENDIF(WITH_ZINRI)

Sylvain Thery's avatar
Sylvain Thery committed
48
IF (WITH_ASSIMP)
49
	add_subdirectory(Assimp Assimp/build)
50
	INSTALL (DIRECTORY Assimp/include/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/Assimp)
Sylvain Thery's avatar
Sylvain Thery committed
51
ENDIF (WITH_ASSIMP)
52

Pierre Kraemer's avatar
Pierre Kraemer committed
53

unknown's avatar
unknown committed
54
55
56
57
58
IF(WIN32)
	SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
	SET(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "" FORCE)
	MARK_AS_ADVANCED(CMAKE_CONFIGURATION_TYPES)
ENDIF(WIN32)