Hello cmake-experts, Am 18.03.15 um 07:59 schrieb Rolf Eike Beer: > 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().
thank you, this helped. I now have the find-module working to create Makefiles on OSX. I have published the intermediate result on github so others can use this find-module. You can find it at https://github.com/deltaphi/Findts3sdk.cmake/ However, all is not well in Findts3sdk-land (apart from the "creative" directory layout already critisized in another mail). As a next step, I want to make the find-module on Windows. I already toyed around with it a bit, but ran into the dll/lib-problem for Visual Studio pretty soon. For those from the future, coming to read this email, this is the file i'm talking about: https://github.com/deltaphi/Findts3sdk.cmake/blob/764580d4e0ad9d73a842838939259734479eff6d/Findts3sdk.cmake What works: find_library() picks up the .lib-file to be used and I can successefully compile and link my project. What doesn't work: To run my project, I need to copy the .dll next to my executable. I made my find-module set ts3sdk_LIBRARY_FILES to a list of the library files and used add_custom_command(...POST_BUILD...) in my main project file to copy the files. However, to copy something, you need it's source path, which I obtain from find_library() on Non-Windows systems. On Windows, find_library() gives me the .lib-file only. I understand that this is the correct behavior for find_library(), but is there another way to find the .dll-file? I gather that find_file() might help, but that doesn't have the same magic of detecting library filenames as find_library() has. Regards, Damian Philipp -- 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