Hi developers,

I propose following changes in CMAKE files.

(1) 
Additional 'config.cmake' file in CMAKEModules for win32 like

SET(PLUGINS_DIR ${OpenSceneGraph_SOURCE_DIR}/Plugins)

SET(ENV{3RDPARTY_DIR} ${PLUGINS_DIR}/3rdParty)
SET(ENV{COLLADA_DIR} ${PLUGINS_DIR}/Collada)
SET(ENV{OPENVRML_DIR} ${PLUGINS_DIR}/OpenVRML)
.....

for more comfortable handling of paths for plugins. 

CMakeLists.txt may be changed (e.g. inserted in line 45) to 

IF(WIN32)
        INCLUDE(config)
        STRING(REPLACE "\\" "/" 3RD_P_DIR $ENV{3RDPARTY_DIR})
        SET(CMAKE_INCLUDE_PATH
"${3RD_P_DIR}/include;${CMAKE_INCLUDE_PATH}")
        SET(CMAKE_LIBRARY_PATH "${3RD_P_DIR}/lib;${CMAKE_LIBRARY_PATH}")
ENDIF(WIN32)

(2)
Changes in Find3rdPartyDependencies.cmake for automatically looking for
ACTUAL_3RDPARTY_DIR

Replace 

SET(ACTUAL_3DPARTY_DIR "${PARENT_DIR}/3rdparty" CACHE PATH "Location of
3rdparty dependencies")

on line 93 by

IF(NOT ACTUAL_3RDPARTY_DIR)
        GET_FILENAME_COMPONENT(PARENT_DIR ${PROJECT_SOURCE_DIR} PATH)
        FIND_PATH(ACTUAL_3RDPARTY_DIR 
                NAMES libjpeg.lib
                PATHS
                        $ENV{3RDPARTY_DIR}/lib
                        ${PARENT_DIR}/3rdparty/lib
        )
        GET_FILENAME_COMPONENT(LOCAL_DIR ${ACTUAL_3RDPARTY_DIR} PATH)
        SET(ACTUAL_3RDPARTY_DIR ${LOCAL_DIR} CACHE PATH "Location of
3rdParty dependencies" FORCE) 
ENDIF(NOT ACTUAL_3RDPARTY_DIR)

Your comments ?

Wolfgang

-----------------------------------------
IABG mbH
Sitz der Gesellschaft: Ottobrunn, Registergericht: Amtsgericht Muenchen, HRB 
5499
Geschaeftsfuehrung: Prof. Dr.-Ing. Rudolf F. Schwarz (Vorsitz), Dipl.-Ing. 
Thomas Dittler, MBA
Vorsitzender des Aufsichtsrats: General a. D. Wolfgang Altenburg

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to