apps_cmake.txt 2.34 KB
Newer Older
1 2

# A mettre juste apres la definition de CGoGN_ROOT_DIR  a la racine du CGoGN_Apps
3
# include(${CGoGN_ROOT_DIR}/build/apps_cmake.txt)
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38

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

find_package(OpenGL)
FIND_PACKAGE(Qt4 REQUIRED)
#for basile ;)
find_package(GLUT)

IF (DEFINED ASSERTON)
	add_definitions(-DCGOGN_ASSERT_BOOL=${ASSERTON})
ELSE (DEFINED ASSERTON)
	add_definitions(-DCGOGN_ASSERT_BOOL=false)
ENDIF (DEFINED ASSERTON)

# FOR Qt4
SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})

# qq definition specifiques pour mac
IF(APPLE)
# 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")
	SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMAC_OSX")
	SET(CMAKE_OSX_ARCHITECTURES x86_64)
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}/windows_dependencies/include/)
	LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/windows_dependencies/lib/)
Sylvain Thery's avatar
Sylvain Thery committed
39 40 41 42 43 44 45 46 47 48 49
	
	MACRO(BOOST_LIBS lib_lists names)
	SET (${lib_lists} "")
	FOREACH(name ${names})
		STRING(REGEX REPLACE "-mt" ${boost_extension} newname ${name})
		SET (${lib_lists} ${${lib_lists}} ${newname} )
	ENDFOREACH(name)
	ENDMACRO(BOOST_LIBS)

	set (BOOST_INCLUDE_PATH ${boost_path})
	
50 51 52 53 54 55 56 57 58 59 60
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)
Sylvain Thery's avatar
Sylvain Thery committed
61 62 63 64 65 66 67 68
		
	MACRO(BOOST_LIBS lib_lists names)
	SET (${lib_lists})
	FOREACH(name ${names})
		SET (${lib_lists} ${${lib_lists}} ${name} )
	ENDFOREACH(name)
	ENDMACRO(BOOST_LIBS)
	
69 70 71 72
ENDIF(WIN32)

SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)

Sylvain Thery's avatar
Sylvain Thery committed
73 74
SET (COMMON_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${DEVIL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBXML2_LIBRARIES} ${boost_regex_lib_lists} gzstream AntTweakBar openctm assimp)

75 76 77
SET(CGoGN_LIBS_D topologyD algoD containerD utilsD)
SET(CGoGN_LIBS_R topology algo container utils)
SET(NUMERICAL_LIBS numerical lapack blas f2c)
Sylvain Thery's avatar
Sylvain Thery committed
78 79 80