Commit 87a180ae authored by Floris Berendsen's avatar Floris Berendsen
Browse files

COMP: resolved logger boost library issues (might need some clean up)

parent 84720e75
......@@ -30,10 +30,15 @@ set( COMMANDLINE_SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/src/selxSuperElastix.cxx
)
#set(Boost_DEBUG ON )
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
set(BOOST_ROOT ${BOOST_ROOT}/BOOST-prefix/src/Boost )
set(BOOST_INCLUDEDIR ${BOOST_ROOT}/boost )
set(BOOST_LIBRARYDIR ${BOOST_ROOT}/stage/lib)
find_package(Boost COMPONENTS program_options system filesystem REQUIRED QUIET )
include_directories(${Boost_INCLUDE_DIR})
......@@ -41,8 +46,6 @@ include_directories(${Boost_INCLUDE_DIR})
add_executable( SuperElastix ${COMMANDLINE_SOURCE_FILES} ${COMMANDLINE_HEADER_FILES} )
target_link_libraries( SuperElastix ${SUPERELASTIX_LIBRARIES} ${Boost_LIBRARIES})
# InstallDemo copies SuperElastix executable, image data, configuration files and bat/bash scripts to the INSTALLDEMO_PREFIX directory
set( INSTALLDEMO_PREFIX ${PROJECT_BINARY_DIR}/Demo CACHE PATH "Demo files will be copied to this directory" )
......
......@@ -108,10 +108,24 @@ endforeach()
set(Boost_USE_STATIC_LIBS ON) # only find static libs
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
#set( Boost_DEBUG ON )
set(BOOST_INCLUDEDIR "${BOOST_ROOT}/BOOST-prefix/src/Boost/boost/" )
set(BOOST_LIBRARYDIR "${BOOST_ROOT}/BOOST-prefix/src/Boost/stage/lib/" )
set(BOOST_ROOT "${BOOST_ROOT}/BOOST-prefix/src/Boost/" )
find_package( Boost COMPONENTS program_options filesystem system REQUIRED QUIET ) # graph log ?
find_package( Boost COMPONENTS filesystem system log date_time thread regex REQUIRED QUIET ) # graph ?
include_directories( ${Boost_INCLUDE_DIRS} )
if (WIN32) # TODO test if we really need this
# disable autolinking in boost
add_definitions( -DBOOST_ALL_NO_LIB )
# force all boost libraries to dynamic link (we already disabled
# autolinking, so I don't know why we need this, but we do!)
add_definitions( -DBOOST_ALL_DYN_LINK )
endif()
# ---------------------------------------------------------------------
# SuperElastix configuration
......
......@@ -60,6 +60,7 @@ set( ${MODULE}_TEST_SOURCE_FILES
)
set( ${MODULE}_LIBRARIES
${Boost_LIBRARIES} # log filesystem system time_date thread
${MODULE}
)
......
......@@ -109,7 +109,7 @@ endif()
mark_as_advanced( USE_SYSTEM_BOOST )
option( USE_SYSTEM_BOOST "Use an installed version of BOOST" OFF )
if( USE_SYSTEM_BOOST )
find_package( BOOST REQUIRED log graph program_options filesystem )
find_package( BOOST REQUIRED log date_time thread regex graph program_options filesystem )
else()
include( ExternalBoost )
endif()
......
......@@ -24,7 +24,7 @@ set( proj BOOST )
# while on Windows, we need CR/LF line feeds (only available in the .zip)
set( BOOST_CONFIGURE_COMMAND )
set( B2_ARGS --with-program_options --with-filesystem --with-log address-model=64 )
set( B2_ARGS --with-program_options --with-filesystem --with-log --with-date_time --with-thread --with-regex address-model=64 )
if( UNIX )
set( BOOST_URL "http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz")
set( BOOST_MD5 51528a0e3b33d9e10aaa311d9eb451e3 )
......
Supports Markdown
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