diff --git a/Apps/Tuto/CMakeLists.txt b/Apps/Tuto/CMakeLists.txt index 50e679c1b0b9ccfe298441370daac346d3f13a68..0f361227073634a8ee07f81340812399f4a54e1c 100644 --- a/Apps/Tuto/CMakeLists.txt +++ b/Apps/Tuto/CMakeLists.txt @@ -14,6 +14,8 @@ ADD_DEFINITIONS(${QT_DEFINITIONS}) # define includes path + +MESSAGE (STATUS ${BOOST_INCLUDE_PATH}) include_directories( ${CMAKE_CURRENT_BINARY_DIR} /usr/include/libxml2/ @@ -22,6 +24,7 @@ include_directories( ${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include ${CGoGN_ROOT_DIR}/ThirdParty/glm ${CGoGN_ROOT_DIR}/include + ${BOOST_INCLUDE_PATH} ) # define libs path @@ -32,7 +35,6 @@ ELSE(WIN32) ENDIF(WIN32) - #define exec to compile QT4_WRAP_CPP(tuto1_moc tuto1.h) @@ -72,10 +74,15 @@ add_executable( tp_master tp_master.cpp ${tp_master_moc}) target_link_libraries( tp_master ${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} ) +#BOOST_LIBS macro: allow using compiled boost in windows (see readme) +# -first argument variable that will contain the libs +# -second argument list of boost libs separated by ; in " " +BOOST_LIBS(boost_lib_lists "boost_thread-mt;boost_iostreams-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_thread-mt) + ${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} ${boost_lib_lists}) QT4_WRAP_CPP(tuto_ogl3_moc tuto_ogl3.h) add_executable( tuto_ogl3 tuto_ogl3.cpp ${tuto_ogl3_moc}) diff --git a/README_VISUAL.TXT b/README_VISUAL.TXT index f409d931486e245ded92f3cd70fd0f3accee412c..ad3d179e7d0a84175a0817068ae3837eb2677fe9 100644 --- a/README_VISUAL.TXT +++ b/README_VISUAL.TXT @@ -10,13 +10,18 @@ Cliquer sur Configure Choisir le bon compilateur (celui de votre version de Visual C++) Recliquer sur Configure Cliquer sur Generate -Unziper le dependencies.zip (http://iggservis.u-strasbg.fr/Data/dependencies.zip) dans le repertoire Visual +Unziper le windows_dependencies.zip (http://iggservis.u-strasbg.fr/Data/) a la racine de CGoGN Aller dans Visual et double-cliquer sur CGoGN.sln !! -Pour que les executables fonctionnent ajouter ....\Visual\dependencies\dll dans la variable d'environnement path +Pour que les executables fonctionnent ajouter le chemin vers les dll dans la variable d'environnement path (ou copier les dll dans un répertoire déjà dans le path) -Remarque: uniquement compilation 32bits testée pour le moment. +Remarque pour l'utilisation de boost (manière simple): +-installer les binaires a l'aide de boostpro (www.boostpro.com) +-definir la varible d'env "boost_extension" avec ce que vous voulez utiliser (exemple: -vc100-mt-1_44) +-definir la varible d'env "boost_path" avec le chemin d'acces (exemple: C:\Program Files\boost\boost_1_44\) +-ajouter le chemin vers les dll dans le path (comme cf ci-dessus) + diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index 72991aae5db4fc6c2cf190b11eb07caabe36ae65..39ceda0d33d9cf56117c6c371e1ef4ffa291951f 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -27,8 +27,19 @@ IF(WIN32) SET(DEVIL_LIBRARIES DevIL ILU ILUT) SET(ZLIB_LIBRARIES zlib) SET(LIBXML2_LIBRARIES xml2) + + MACRO(BOOST_LIBS lib_lists names) + SET (${lib_lists} "") + FOREACH(name ${names}) + STRING(REGEX REPLACE "-mt" $ENV{boost_extension} newname ${name}) + SET (${lib_lists} ${${lib_lists}} ${newname} ) + ENDFOREACH(name) + ENDMACRO(BOOST_LIBS) + + set (BOOST_INCLUDE_PATH $ENV{boost_path}) + INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/include/) - LINK_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/lib/) + LINK_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/lib/ $ENV{boost_path}/lib) add_subdirectory(Release) add_subdirectory(${CGoGN_ROOT_DIR}/Apps Apps) if (EXISTS "${CGoGN_ROOT_DIR}/Perso") @@ -51,6 +62,14 @@ ELSE(WIN32) ELSE(IL_LIBRARIES) SET(DEVIL_LIBRARIES ${IL_LIBRARY} ${ILU_LIBRARY} ${ILUT_LIBRARY}) ENDIF(IL_LIBRARIES) + + MACRO(BOOST_LIBS lib_lists names) + SET (${lib_lists}) + FOREACH(name ${names}) + STRING(REGEX REPLACE "-mt" $ENV{boost_libs_extension} newname ${name}) + SET (${lib_lists} ${${lib_lists}} ${name} ) + ENDFOREACH(name) + ENDMACRO(BOOST_LIBS) add_subdirectory(Release) add_subdirectory(Debug)