Commit b6da7331 authored by Sylvain Thery's avatar Sylvain Thery

Modification cmake/boost

parent 787e7e45
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)
......
......@@ -12,6 +12,8 @@ INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
find_package(Boost COMPONENTS regex REQUIRED)
# define includes path
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
......
......@@ -13,9 +13,6 @@ INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
# define includes path
MESSAGE (STATUS ${BOOST_INCLUDE_PATH})
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
/usr/include/libxml2/
......@@ -24,7 +21,7 @@ include_directories(
${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include
${CGoGN_ROOT_DIR}/ThirdParty/glm
${CGoGN_ROOT_DIR}/include
${BOOST_INCLUDE_PATH}
${Boost_INCLUDE_DIRS}
)
# define libs path
......@@ -35,6 +32,9 @@ ELSE(WIN32)
ENDIF(WIN32)
# define boost component usage (here only thread)
find_package(Boost COMPONENTS thread REQUIRED)
#define exec to compile
QT4_WRAP_CPP(tuto1_moc tuto1.h)
......@@ -79,17 +79,19 @@ target_link_libraries( tp_master
# -first argument variable that will contain the libs
# -second argument list of boost libs separated by ; in " "
# 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)
add_executable( tuto_mt tuto_mt.cpp ${tuto_mt_moc})
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)
add_executable( tuto_ogl3 tuto_ogl3.cpp ${tuto_ogl3_moc})
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/")
find_package(OpenGL REQUIRED)
find_package(Qt4 REQUIRED)
find_package(GLUT)
find_package(Boost COMPONENTS regex thread REQUIRED)
IF (DEFINED ASSERTON)
add_definitions(-DCGOGN_ASSERT_BOOL=${ASSERTON})
......@@ -36,15 +38,14 @@ IF(WIN32)
SET(ZLIB_LIBRARIES zlib)
SET(LIBXML2_LIBRARIES xml2)
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})
# 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})
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/include/)
LINK_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/lib/ ${boost_path}/lib)
......@@ -71,12 +72,12 @@ ELSE(WIN32)
SET(DEVIL_LIBRARIES ${IL_LIBRARY} ${ILU_LIBRARY} ${ILUT_LIBRARY})
ENDIF(IL_LIBRARIES)
MACRO(BOOST_LIBS lib_lists names)
SET (${lib_lists})
FOREACH(name ${names})
SET (${lib_lists} ${${lib_lists}} ${name} )
ENDFOREACH(name)
ENDMACRO(BOOST_LIBS)
# MACRO(BOOST_LIBS lib_lists names)
# SET (${lib_lists})
# FOREACH(name ${names})
# SET (${lib_lists} ${${lib_lists}} ${name} )
# ENDFOREACH(name)
# ENDMACRO(BOOST_LIBS)
add_subdirectory(Release)
add_subdirectory(Debug)
......
......@@ -27,6 +27,7 @@ include_directories(
${CGoGN_ROOT_DIR}/ThirdParty/gzstream
${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include
${CGoGN_ROOT_DIR}/ThirdParty/glm
${Boost_INCLUDE_DIRS}
)
......
......@@ -29,6 +29,7 @@ include_directories(
${CGoGN_ROOT_DIR}/ThirdParty/gzstream
${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include
${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