Commit b6da7331 authored by Sylvain Thery's avatar Sylvain Thery

Modification cmake/boost

parent 787e7e45
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin) SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin)
BOOST_LIBS(boost_regex_lib_lists "boost_regex-mt") #BOOST_LIBS(boost_regex_lib_lists "boost_regex-mt")
SET (COMMON_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${DEVIL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBXML2_LIBRARIES} ${boost_regex_lib_lists} gzstream AntTweakBar openctm assimp) SET (COMMON_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${DEVIL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBXML2_LIBRARIES} ${Boost_REGEX_LIBRARY} ${Boost_THREAD_LIBRARY} gzstream AntTweakBar openctm assimp)
SET(CGoGN_LIBS_R topology algo container utils) SET(CGoGN_LIBS_R topology algo container utils)
......
...@@ -12,6 +12,8 @@ INCLUDE(${QT_USE_FILE}) ...@@ -12,6 +12,8 @@ INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_DEFINITIONS(${QT_DEFINITIONS})
find_package(Boost COMPONENTS regex REQUIRED)
# define includes path # define includes path
include_directories( include_directories(
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
......
...@@ -13,9 +13,6 @@ INCLUDE(${QT_USE_FILE}) ...@@ -13,9 +13,6 @@ INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_DEFINITIONS(${QT_DEFINITIONS})
# define includes path
MESSAGE (STATUS ${BOOST_INCLUDE_PATH})
include_directories( include_directories(
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
/usr/include/libxml2/ /usr/include/libxml2/
...@@ -24,7 +21,7 @@ include_directories( ...@@ -24,7 +21,7 @@ include_directories(
${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include ${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include
${CGoGN_ROOT_DIR}/ThirdParty/glm ${CGoGN_ROOT_DIR}/ThirdParty/glm
${CGoGN_ROOT_DIR}/include ${CGoGN_ROOT_DIR}/include
${BOOST_INCLUDE_PATH} ${Boost_INCLUDE_DIRS}
) )
# define libs path # define libs path
...@@ -35,6 +32,9 @@ ELSE(WIN32) ...@@ -35,6 +32,9 @@ ELSE(WIN32)
ENDIF(WIN32) ENDIF(WIN32)
# define boost component usage (here only thread)
find_package(Boost COMPONENTS thread REQUIRED)
#define exec to compile #define exec to compile
QT4_WRAP_CPP(tuto1_moc tuto1.h) QT4_WRAP_CPP(tuto1_moc tuto1.h)
...@@ -79,17 +79,19 @@ target_link_libraries( tp_master ...@@ -79,17 +79,19 @@ target_link_libraries( tp_master
# -first argument variable that will contain the libs # -first argument variable that will contain the libs
# -second argument list of boost libs separated by ; in " " # -second argument list of boost libs separated by ; in " "
# exemple: BOOST_LIBS(boost_lib_lists "boost_thread-mt;boost_iostreams-mt") # exemple: BOOST_LIBS(boost_lib_lists "boost_thread-mt;boost_iostreams-mt")
BOOST_LIBS(boost_lib_lists "boost_thread-mt") #BOOST_LIBS(boost_lib_lists "boost_thread-mt")
QT4_WRAP_CPP(tuto_mt_moc tuto_mt.h) QT4_WRAP_CPP(tuto_mt_moc tuto_mt.h)
add_executable( tuto_mt tuto_mt.cpp ${tuto_mt_moc}) add_executable( tuto_mt tuto_mt.cpp ${tuto_mt_moc})
target_link_libraries( tuto_mt target_link_libraries( tuto_mt
${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} ${boost_lib_lists}) ${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} ${Boost_THREAD_LIBRARY})
QT4_WRAP_CPP(tuto_ogl3_moc tuto_ogl3.h) QT4_WRAP_CPP(tuto_ogl3_moc tuto_ogl3.h)
add_executable( tuto_ogl3 tuto_ogl3.cpp ${tuto_ogl3_moc}) add_executable( tuto_ogl3 tuto_ogl3.cpp ${tuto_ogl3_moc})
target_link_libraries( tuto_ogl3 target_link_libraries( tuto_ogl3
${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} ) ${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES})
......
...@@ -12,6 +12,8 @@ SET(CMAKE_MODULE_PATH " ${CMAKE_MODULE_PATH} ${CGoGN_ROOT_DIR}/cmake_modules/") ...@@ -12,6 +12,8 @@ SET(CMAKE_MODULE_PATH " ${CMAKE_MODULE_PATH} ${CGoGN_ROOT_DIR}/cmake_modules/")
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
find_package(Qt4 REQUIRED) find_package(Qt4 REQUIRED)
find_package(GLUT) find_package(GLUT)
find_package(Boost COMPONENTS regex thread REQUIRED)
IF (DEFINED ASSERTON) IF (DEFINED ASSERTON)
add_definitions(-DCGOGN_ASSERT_BOOL=${ASSERTON}) add_definitions(-DCGOGN_ASSERT_BOOL=${ASSERTON})
...@@ -36,15 +38,14 @@ IF(WIN32) ...@@ -36,15 +38,14 @@ IF(WIN32)
SET(ZLIB_LIBRARIES zlib) SET(ZLIB_LIBRARIES zlib)
SET(LIBXML2_LIBRARIES xml2) SET(LIBXML2_LIBRARIES xml2)
MACRO(BOOST_LIBS lib_lists names) # MACRO(BOOST_LIBS lib_lists names)
SET (${lib_lists} "") # SET (${lib_lists} "")
FOREACH(name ${names}) # FOREACH(name ${names})
STRING(REGEX REPLACE "-mt" ${boost_extension} newname ${name}) # STRING(REGEX REPLACE "-mt" ${boost_extension} newname ${name})
SET (${lib_lists} ${${lib_lists}} ${newname} ) # SET (${lib_lists} ${${lib_lists}} ${newname} )
ENDFOREACH(name) # ENDFOREACH(name)
ENDMACRO(BOOST_LIBS) # ENDMACRO(BOOST_LIBS)
# set (BOOST_INCLUDE_PATH ${boost_path})
set (BOOST_INCLUDE_PATH ${boost_path})
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/include/) INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/include/)
LINK_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/lib/ ${boost_path}/lib) LINK_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/lib/ ${boost_path}/lib)
...@@ -71,12 +72,12 @@ ELSE(WIN32) ...@@ -71,12 +72,12 @@ ELSE(WIN32)
SET(DEVIL_LIBRARIES ${IL_LIBRARY} ${ILU_LIBRARY} ${ILUT_LIBRARY}) SET(DEVIL_LIBRARIES ${IL_LIBRARY} ${ILU_LIBRARY} ${ILUT_LIBRARY})
ENDIF(IL_LIBRARIES) ENDIF(IL_LIBRARIES)
MACRO(BOOST_LIBS lib_lists names) # MACRO(BOOST_LIBS lib_lists names)
SET (${lib_lists}) # SET (${lib_lists})
FOREACH(name ${names}) # FOREACH(name ${names})
SET (${lib_lists} ${${lib_lists}} ${name} ) # SET (${lib_lists} ${${lib_lists}} ${name} )
ENDFOREACH(name) # ENDFOREACH(name)
ENDMACRO(BOOST_LIBS) # ENDMACRO(BOOST_LIBS)
add_subdirectory(Release) add_subdirectory(Release)
add_subdirectory(Debug) add_subdirectory(Debug)
......
...@@ -27,6 +27,7 @@ include_directories( ...@@ -27,6 +27,7 @@ include_directories(
${CGoGN_ROOT_DIR}/ThirdParty/gzstream ${CGoGN_ROOT_DIR}/ThirdParty/gzstream
${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include ${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include
${CGoGN_ROOT_DIR}/ThirdParty/glm ${CGoGN_ROOT_DIR}/ThirdParty/glm
${Boost_INCLUDE_DIRS}
) )
......
...@@ -29,6 +29,7 @@ include_directories( ...@@ -29,6 +29,7 @@ include_directories(
${CGoGN_ROOT_DIR}/ThirdParty/gzstream ${CGoGN_ROOT_DIR}/ThirdParty/gzstream
${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include ${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include
${CGoGN_ROOT_DIR}/ThirdParty/glm ${CGoGN_ROOT_DIR}/ThirdParty/glm
${Boost_INCLUDE_DIRS}
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment