Hello,
I have code like the following in my CMakeLists.txt file to make it
simpler to import code from a library.
install(TARGETS ${PROJECT_NAME} DESTINATION
${CMAKE_CURRENT_SOURCE_DIR}/../lib/${BUILD_TYPE_GNU_ONLY} EXPORT
${PROJECT_NAME}-targets)
install(EXPORT ${PROJECT_NAME}-targets DESTINATION
${CMAKE_CURRENT_SOURCE_DIR}/../lib/${BUILD_TYPE_GNU_ONLY})
The problem I have, is that for one project, it creates the files:
myproja-targets.cmake
myproja-targets-<buildtype>.cmake
However, the same lines of code in a different project only produces
myprojb-targets.cmake
And when myprojc tries to use myprojb via:
include(${CMAKE_CURRENT_SOURCE_DIR}/../myprojb/lib/${BUILD_TYPE_GNU_ONLY}/myprojb-targets.cmake)
It fails, however the same line above modified for myproja succeeds
As a note, the lib files for myproja and myprojb are both created and
installed as expected.
During writing this, I discovered a minor discrepancy in the install
outputs, the one that succeeds, has this:
-- Install configuration: "<build type>"
However, the one that fails has:
-- Install configuration: ""
The interesting thing to me is that I did not specify the build type in
a different way, both CMakeLists.txt include a file that sets
CMAKE_BUILD_TYPE automatically if not specified on the cmd line.
Any suggestions?
Thanks
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake