CMakeLists.txt 1.85 KB
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1
2
3
4
5
6
7
8
cmake_minimum_required(VERSION 2.6)

project(SocialAgents)

# a decommenter si on veut voir ce qui se passe a la compilation
#set( CMAKE_VERBOSE_MAKEFILE 1 )

SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/../../CGoGN)
Thomas's avatar
Thomas committed
9
10
include(${CGoGN_ROOT_DIR}/build/apps_cmake.txt)

Pierre Kraemer's avatar
Pierre Kraemer committed
11
12
13
14
15
16

SET(CMAKE_MODULE_PATH " ${CMAKE_MODULE_PATH} ${CGoGN_ROOT_DIR}/cmake_modules/")

find_package(OpenGL)
find_package(GLUT)

Pierre Kraemer's avatar
Pierre Kraemer committed
17
18
19
20
21
22
# FOR Qt4
FIND_PACKAGE(Qt4 REQUIRED)
SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})

Pierre Kraemer's avatar
Pierre Kraemer committed
23
24
25
26
27
# qq definition specifiques pour mac
IF(APPLE)
# attention a changer pour chercher la bonne version automatiquement
	SET(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.6.sdk")
	SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined -Wl,dynamic_lookup")
Pierre Kraemer's avatar
Pierre Kraemer committed
28
29
	SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMAC_OSX")
	SET(CMAKE_OSX_ARCHITECTURES x86_64)
Pierre Kraemer's avatar
Pierre Kraemer committed
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
ENDIF(APPLE)

IF(WIN32)
	SET(GLEW_LIBRARY glew32)
	SET(DEVIL_LIBRARIES DevIL ILU ILUT)
	SET(ZLIB_LIBRARIES zlib)
	SET(LIBXML2_LIBRARIES xml2)
	INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/dependencies/include/)
	LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/dependencies/lib/)
ELSE(WIN32)
	SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
	find_package(DevIL)
	find_package(ZLIB)
	find_package(LibXml2)
	SET(GLEW_LIBRARY GLEW)
	IF (IL_LIBRARIES)
		SET(DEVIL_LIBRARIES ${IL_LIBRARIES} ${ILU_LIBRARIES} ${ILUT_LIBRARIES})
	ELSE(IL_LIBRARIES)
		SET(DEVIL_LIBRARIES ${IL_LIBRARY} ${ILU_LIBRARY} ${ILUT_LIBRARY})
	ENDIF(IL_LIBRARIES)
ENDIF(WIN32)

SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)

Pierre Kraemer's avatar
Pierre Kraemer committed
54
55
56
57
SET(COMMON_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${DEVIL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBXML2_LIBRARIES} gzstream openctm assimp)
SET(CGoGN_LIBS_D topologyD algoD containerD utilsD)
SET(CGoGN_LIBS_R topology algo container utils)
SET(NUMERICAL_LIBS numerical lapack blas f2c)
Pierre Kraemer's avatar
Pierre Kraemer committed
58
59
60
61

add_subdirectory(Release)
add_subdirectory(Debug)