Hi,

Our project uses boost on Windows. Except thread library, all other library
need to be linked statically. To achieve this, what I did is this

ADD_DEFINITIONS(-D BOOST_THREAD_DYN_DLL)
set(Boost_USE_STATIC_LIBS        ON)
set(Boost_USE_MULTITHREADED      ON)
find_package( Boost COMPONENTS thread system date_time regex filesystem
chrono)

As per boost documentation, in windows the static boost libraries are
started with the name "libboost*.lib" and the import libraries of dlls
start with "boost*".

If I turn ON or OFF  "Boost_USE_STATIC_LIBS", the value returned by

GET_FILENAME_COMPONENT(BFILESYS ${Boost_FILESYSTEM_LIBRARY_RELEASE} NAME_WE)

is always  "C:/Program
Files/boost_1_53_0/stage/lib/libboost_filesystem-vc100-mt-1_53.lib"

I was expecting that, if the Boost_USE_STATIC_LIBS is ON, the output to be
"*lib*boost_filesystem-vc100-mt-1_53.lib" and if the  Boost_USE_STATIC_LIBS
is OFF, the output to be "boost_filesystem-vc100-mt-1_53.lib".

Is anything going wrong here? Can anybody clarify this?

Thanks,
  Lloyd
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to