CMakeLists.txt 1.96 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")
Sylvain Thery's avatar
Sylvain Thery committed
32

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

Pierre Kraemer's avatar
Pierre Kraemer committed
37

38

39 40
add_subdirectory(Tools Tools/build)

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

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

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

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

Pierre Kraemer's avatar
Pierre Kraemer committed
57

unknown's avatar
unknown committed
58 59 60 61 62
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)