Am Mittwoch, 18. März 2015, 07:23:12 schrieb Damian Philipp:
> Hello cmake-experts,
> 
> I am working on a project that uses a third-party library delivered in
> binary form (TeamSpeak 3 SDK). My project is supposed to build on Win,
> Linux, and OSX, so I decided to use cmake as a build tool. I have
> started work on a Findts3sdk.cmake (find_package() in module mode) to
> let cmake detect the library in the CMAKE_PREFIX_PATH on any of my
> machines - file attached at the end of this mail.
> 
> My (current) problem is that a call to find_path() in my
> Findts3sdk.cmake will not pick up the bin directory containing the
> libraries, while another call did work to find the include directory.
> 
> WORKS (ts3sdk_INCLUDE_DIR == /path/to/ts3_sdk_3.0.3/include):
> > find_path(ts3sdk_INCLUDE_DIR NAMES clientlib.h HINTS
> > ${CMAKE_PREFIX_PATH}/include)
> BROKEN (ts3sdk_LIBRARY_DIR == ts3sdk_LIBRARY_DIR-NOTFOUND):
> > find_path(ts3sdk_LIBRARY_DIR NAMES libts3client_mac.dylib HINTS
> > ${CMAKE_PREFIX_PATH}/bin)

Use find_library() to find the library itself. If you really need the library 
directory (you probably don't) then use get_filename_component() on the library 
location returned by find_library().

Eike

Attachment: signature.asc
Description: This is a digitally signed message part.

-- 

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