CMakeLists.txt 2.21 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
ENDIF (${CMAKE_CURRENT_BINARY_DIR} MATCHES "(.*)Debug")

IF(WIN32)
18
	SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib) #release added by visual
unknown's avatar
unknown committed
19
	INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/include/)
unknown's avatar
unknown committed
20
	INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/include/suitesparse)
unknown's avatar
unknown committed
21 22 23 24 25
ELSE(WIN32)
	SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE})
ENDIF(WIN32)


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

30 31
SET (WITH_ASSIMP ON CACHE BOOL "build with Assimp")
SET (WITH_ZINRI ON CACHE BOOL "build with Zinri libs")
Thery Sylvain's avatar
Thery Sylvain committed
32
SET (WITH_PYTHONQT ON CACHE BOOL "build PythonQt (for Schnapps)")
Sylvain Thery's avatar
Sylvain Thery committed
33

34 35 36
IF (APPLE)
	SET(CMAKE_OSX_ARCHITECTURES x86_64)
ENDIF(APPLE)
37 38 39

add_subdirectory(Tools Tools/build)

Thery Sylvain's avatar
Thery Sylvain committed
40 41 42 43
IF (WITH_PYTHONQT)
	add_subdirectory(PythonQt PythonQt/build)
	INSTALL (DIRECTORY PythonQt/src/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/PythonQt FILES_MATCHING PATTERN "*.h")
ENDIF (WITH_PYTHONQT)
44

45 46 47
add_subdirectory(OpenNL OpenNL/build)
INSTALL (DIRECTORY OpenNL/src/NL/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/NL FILES_MATCHING PATTERN "*.h")

48 49 50
add_subdirectory(tetgen tetgen/build)
INSTALL (DIRECTORY tetgen/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/tetgen FILES_MATCHING PATTERN "*.h")

51 52
IF (WITH_ZINRI)
	add_subdirectory(Zinri Zinri/build)
53
	INSTALL (DIRECTORY Zinri/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/Zinri FILES_MATCHING PATTERN "*.h")
54 55
ENDIF(WITH_ZINRI)

Sylvain Thery's avatar
Sylvain Thery committed
56
IF (WITH_ASSIMP)
57
	add_subdirectory(Assimp Assimp/build)
58
	INSTALL (DIRECTORY Assimp/include/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/Assimp)
Sylvain Thery's avatar
Sylvain Thery committed
59
ENDIF (WITH_ASSIMP)
60

Pierre Kraemer's avatar
Pierre Kraemer committed
61

unknown's avatar
unknown committed
62 63 64 65 66
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)