CMakeLists.txt 2.07 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

Pierre Kraemer's avatar
Pierre Kraemer committed
38

39

40 41
add_subdirectory(Tools Tools/build)

Thery Sylvain's avatar
Thery Sylvain committed
42 43 44 45
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)
46

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

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

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

Pierre Kraemer's avatar
Pierre Kraemer committed
60

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