Hello guys, I added a sound library to my project, So I first created a cmake module to find it
MESSAGE(STATUS "Looking for IrrKlang...") find_library(IrrKlang_LIBRARIES irrKlang ${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/IrrKLangAudioEngine/bin/macosx-gcc ) find_path(IrrKlang_INCLUDE_DIRS irrKlang.h ${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/IrrKLangAudioEngine/include ) IF (IrrKlang_INCLUDE_DIRS AND IrrKlang_LIBRARIES) SET(IrrKlang_FOUND TRUE) ENDIF (IrrKlang_INCLUDE_DIRS AND IrrKlang_LIBRARIES) IF (IrrKlang_FOUND) IF (NOT IrrKlang_FIND_QUIETLY) MESSAGE(STATUS "Found IrrKlang: ${IrrKlang_LIBRARIES}") ENDIF (NOT IrrKlang_FIND_QUIETLY) ELSE (IrrKlang_FOUND) IF (IrrKlang_FIND_REQUIRED) MESSAGE(FATAL_ERROR "Could not find IrrKlang") ENDIF (IrrKlang_FIND_REQUIRED) ENDIF (IrrKlang_FOUND) Everything works fine exept I can't control from where the library is linked. Why after I build my project OSX is looking for that library in /usr/local/lib ? Is there a way to tell cmake to link the library from where it find it i.e ${CMAKE_CURRENT_SOURCE_DIR}/Dependencies/IrrKLangAudioEngine/bin/macosx-gcc ? here is my otool output after building the project $ otool -L ./bin/MacOSX/OgreApp.app/Contents/MacOS/OgreApp ./bin/MacOSX/OgreApp.app/Contents/MacOS/OgreApp: @executable_path/../Frameworks/Ogre.framework/Versions/1.7.1/Ogre (compatibility version 0.0.0, current version 1.7.1) @executable_path/../Components/libOgreRTShaderSystem.dylib (compatibility version 0.0.0, current version 1.7.1) @executable_path/../Frameworks/OIS.framework/Versions/A/OIS (compatibility version 1.0.0, current version 1.0.0) /usr/local/lib/libirrklang.dylib (compatibility version 1.0.0, current version 1.0.0) --> I want cmake to link that lib, because my lib is not there. /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0) I know I can correct the path with bundleutilities, but the library still need to be copied in /usr/local/lib to be preccessed by bundleutilitities in that case. Do you have any ideas ? Mino
_______________________________________________ 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