Hi,
I am new to Xcode and I am currently trying to replicate existing Xcode
projects (i manually created) with CMake for future portability reasons.
Anyways, I am experiencing some weirdness when trying to build a static library
using the Xcode generator. Here is an excerpt of the CMake script:
#find boost
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost COMPONENTS system thread chrono REQUIRED)
include_directories( ${Boost_INCLUDE_DIR} )
link_directories(${Boost_LIBRARY_DIRS})
#add other things...
add_library(MotorCore STATIC ${sources})
target_link_libraries(MotorCore ${Boost_LIBRARIES})
Boost is found, the static library libMotorCore.a builds fine in Xcode. What
makes me wondering though is that there is no hint inside Xcode about the
linking with boost system, thread or chrono. Neither in the library search
paths, nor in a Link Binary with Libraries build phase. Now if I add the
libMotorCore.a to another project i get lots of linker errors related to boost.
if I manually add a Link Binary with Libraries build phase in the CMake
generated Xcode project, things work as expected, and boost gets properly
linked. Am I doing something wrong?
Is there any way to link libraries in CMake that works like Xcode's Link Binary
with Libraries build phase?
Thanks for your time!
--
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