hi,
i'm using usage requirements to pass on dependencies in the build system.
--
set(MY_DEBUG_LIB libDebug.lib)
set(MY_RELEASE_LIB libRelease.lib)
target_link_libraries(mylib
debug ${MY_DEBUG_LIB}
optimized ${MY_RELEASE_LIB})
add_executable(myapp somesrc.cpp)
target_link_libraries( myapp mylib )
--
under windows (ninja & msvc generators), both the libraries in
${MY_DEBUG_LIB} and the ones in ${MY_RELEASE_LIB} are linked into the
myapp target.
is this a bug or a feature? or is there any better way to ensure that
only the libraries for the current build type are linked?
thanks a lot,
tim
--
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