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

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

IF(WIN32)
Sylvain Thery's avatar
Sylvain Thery committed
8
	
unknown's avatar
unknown committed
9 10 11
ENDIF(WIN32)

IF (${CMAKE_CURRENT_BINARY_DIR} MATCHES "(.*)Debug")
Sylvain Thery's avatar
Sylvain Thery committed
12 13 14 15
	set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Debug/Release" FORCE)
ELSE()
	set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Debug/Release" FORCE)	
ENDIF()
unknown's avatar
unknown committed
16 17

IF(WIN32)
Sylvain Thery's avatar
Sylvain Thery committed
18
	set(CMAKE_PREFIX_PATH ${CGoGN_ROOT_DIR}/windows_dependencies CACHE STRING "path to dependencies")
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)
Sylvain Thery's avatar
Sylvain Thery committed
21 22 23 24 25 26 27 28 29 30
	SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib)
	set(CMAKE_CONFIGURATION_TYPES Release Debug)
#	SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
#	SET(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "" FORCE)
#	MARK_AS_ADVANCED(CMAKE_CONFIGURATION_TYPES)
ELSE()
	SET(LIBRARY_OUTPUT_PATH ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE})
ENDIF()
IF(WIN32)
	
unknown's avatar
unknown committed
31 32
ENDIF(WIN32)

Sylvain Thery's avatar
Sylvain Thery committed
33

unknown's avatar
unknown committed
34

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

Sylvain Thery's avatar
Sylvain Thery committed
39
SET (WITH_ASSIMP OFF CACHE BOOL "build with Assimp")
40
SET (WITH_ZINRI ON CACHE BOOL "build with Zinri libs")
Thery Sylvain's avatar
Thery Sylvain committed
41
SET (WITH_PYTHONQT ON CACHE BOOL "build PythonQt (for Schnapps)")
Sylvain Thery's avatar
Sylvain Thery committed
42

43 44 45
IF (APPLE)
	SET(CMAKE_OSX_ARCHITECTURES x86_64)
ENDIF(APPLE)
46 47 48

add_subdirectory(Tools Tools/build)

Thery Sylvain's avatar
Thery Sylvain committed
49 50 51 52
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)
53

54 55 56
add_subdirectory(OpenNL OpenNL/build)
INSTALL (DIRECTORY OpenNL/src/NL/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/NL FILES_MATCHING PATTERN "*.h")

57 58 59
add_subdirectory(tetgen tetgen/build)
INSTALL (DIRECTORY tetgen/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/tetgen FILES_MATCHING PATTERN "*.h")

60 61
IF (WITH_ZINRI)
	add_subdirectory(Zinri Zinri/build)
62
	INSTALL (DIRECTORY Zinri/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/Zinri FILES_MATCHING PATTERN "*.h")
63 64
ENDIF(WITH_ZINRI)

Sylvain Thery's avatar
Sylvain Thery committed
65
IF (WITH_ASSIMP)
66
	add_subdirectory(Assimp Assimp/build)
67
	INSTALL (DIRECTORY Assimp/include/ DESTINATION ${CGoGN_ROOT_DIR}/ThirdParty/include/Assimp)
Sylvain Thery's avatar
Sylvain Thery committed
68
ENDIF (WITH_ASSIMP)
69

Pierre Kraemer's avatar
Pierre Kraemer committed
70

Sylvain Thery's avatar
Sylvain Thery committed
71