Hi Robert, hi all,

I spotted the binaries are not in /bin as usual with my new config (CMake 
2.8.2, VS2010 x64), but in /bin/Debug and /bin/Release.
I think CMake 2.8.2 is the cause because the usual way to work around these 
subdirs should not work anymore (SET_TARGET_PROPERTIES("Target" PROPERTIES 
PREFIX "../")). I found a way to make it work properly. However I don't post it 
as a submussion because I didn't test it as it should (not tested under Linux), 
and I guess we must write some versionning code (if cmake version is below 
x.y.z...). Here is my code, to be put in the root CMakeLists.txt:

Instead of using
    SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_LIBDIR})
and such, use:
    SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_<CONFIG> "${OUTPUT_LIBDIR}")

So the code should look like:

FOREACH(CONF ${CMAKE_CONFIGURATION_TYPES})
        STRING(TOUPPER "${CONF}" CONF)
        SET("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_LIBDIR}")
        SET("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_BINDIR}")
        IF(WIN32)
                SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_BINDIR}")
        ELSE()
                SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_LIBDIR}")
        ENDIF()
ENDFOREACH()


Hope someone will take a few minutes to write a nice CMake script (and figure 
out the version number from which this can bu used, if this is really 100% 
CMake related)
Cheers,

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to