Hello,
 
We have an internal software product foo which is exported.
 
A typical component:
add_library(foo_library SHARED ...)
target_link_libraries(foo_library 
  foo_common 
  foo_comp
  ${Boost_LIBRARIES})
 
When building the exported package a file name FooDepends-release.cmake is 
produced which contains;
set_target_properties(foo_library PROPERTIES
  IMPORTED_IMPLIB_RELEASE "${_IMPORT_PREFIX}/lib/foo_library.lib"
  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE 
"foo_common;foo_comp;c:\boost\lib\boost_filesystem-vc110-mt-1_55.lib;")
 
In another software product we use Find_Package command to find foo. Linking 
also works;
add_library(bar-library SHARED ...)
target_link_libraries(bar-library
  foo_library
  ${Boost_LIBRARIES})
 
There is one problem with this setup and that is the 
IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE contains a static path to a boost 
lib. So the "c:\boost\lib\boost_filesystem-vc110-mt-1_55.lib" is appended to 
the linking of "bar-library" and this will fail if the path is incorrect. We 
cannot guarantee that boost is located at the same path on all Windows system. 
So how can we remove or update the boost path?
Using CMake 2.8.12 on Windows 7.
 
                                          
-- 

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://public.kitware.com/mailman/listinfo/cmake

Reply via email to