Am Donnerstag, 12. Mai 2011, 14:51:42 schrieb Heine, Christian: > Hmm, this is strange. I've followed your instructions, but those take no > effect. When i try to run the executable I got the failure message box that > my libbrOpenGL.dll of the acutal build result is missing. Here is what I do > on demo build: > > INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} > ${CMAKE_CURRENT_SOURCE_DIR} > ${CMAKE_SOURCE_DIR}/include > ${COMPILER_ROOT}/include/binrev > ) > > # Find OpenGL library using default CMake find script > FIND_PACKAGE(OpenGL REQUIRED) > > # create output directory > SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) > > # Make sure the linker can find our libraries once they are built. > LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib)
This is basically always wrong. Since you usually pass absolute paths to target_link_libraries() this doesn't help in any way but may cause trouble. Just don't do it. > # Find our cmake utils with different reusable macros > FIND_PACKAGE(OpenGL REQUIRED) You already did that before. > # create exectuable > SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin) Since CMAKE_RUNTIME_OUTPUT_DIRECTORY is already set you should not need that anymore. > ADD_EXECUTABLE(mydemo demo_win32Camera.cpp) > > #link test libraries for unit tests > TARGET_LINK_LIBRARIES( mydemo > brOpenGL # this is the library of the actual build > brCore brMath brGraphics # this are other required libs > ) These br* things are be created by add_library(... shared ...) in your project, no? Then this should work if you had previously set CMAKE_LIBRARY_OUTPUT_DIRECTORY to bin or so. Eike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ 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