Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5649 for code/branches


Ignore:
Timestamp:
Aug 16, 2009, 4:21:01 PM (15 years ago)
Author:
rgrieder
Message:

Fixed msvc build: I had to link the plugins as SHARED instead of MODULE because CMake doesn't allow modules to be linked against another module.
The reason why it did work after all was because the quest library was built before overlays causing CMake to link against whatever it found under the name "overlays" in the end (which was of course the output file instead of the CMake representation of a library). Since msvc never links against dlls but rather against the corresponding *.lib file things got completely busted.

Also added the proposed fix for the PATH variable (successfully tested under Windows by deleting the overlays.plugin file).

Location:
code/branches/libraries
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/libraries/cmake/TargetUtilities.cmake

    r5636 r5649  
    148148  ENDIF()
    149149
    150   # PLUGIN A
     150  # PLUGIN A, always create shared libraries
    151151  IF(_arg_PLUGIN)
    152     SET(_arg_SHARED MODULE)
     152    SET(_arg_SHARED SHARED)
    153153    SET(_arg_STATIC)
    154154  ENDIF()
     
    165165  # PLUGIN B
    166166  IF (_arg_PLUGIN)
    167     SET_TARGET_PROPERTIES(${_target_name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_PLUGIN_OUTPUT_DIRECTORY})
     167    SET_TARGET_PROPERTIES(${_target_name} PROPERTIES
     168      RUNTIME_OUTPUT_DIRECTORY ${CMAKE_PLUGIN_OUTPUT_DIRECTORY} # Windows
     169      LIBRARY_OUTPUT_DIRECTORY ${CMAKE_PLUGIN_OUTPUT_DIRECTORY} # Unix
     170    )
    168171    ADD_PLUGIN(${_target_name})
    169172  ENDIF()
     
    197200
    198201  IF(NOT _arg_STATIC AND NOT _arg_NO_INSTALL)
    199     SET(_library_destination ${ORXONOX_LIBRARY_INSTALL_PATH})
    200     IF (_arg_PLUGIN)
    201       SET(_library_destination ${ORXONOX_PLUGIN_INSTALL_PATH})
    202     ENDIF()
    203 
    204     INSTALL(TARGETS ${_target_name}
    205       RUNTIME DESTINATION ${ORXONOX_RUNTIME_INSTALL_PATH}
    206       LIBRARY DESTINATION ${_library_destination}
    207     )
     202    IF(_arg_PLUGIN)
     203      INSTALL(TARGETS ${_target_name}
     204        RUNTIME DESTINATION ${ORXONOX_PLUGIN_INSTALL_PATH}
     205        LIBRARY DESTINATION ${ORXONOX_PLUGIN_INSTALL_PATH}
     206      )
     207    ELSE()
     208      INSTALL(TARGETS ${_target_name}
     209        RUNTIME DESTINATION ${ORXONOX_RUNTIME_INSTALL_PATH}
     210        LIBRARY DESTINATION ${ORXONOX_LIBRARY_INSTALL_PATH}
     211      )
     212    ENDIF()
    208213  ENDIF()
    209214
  • code/branches/libraries/src/core/Core.cc

    r5647 r5649  
    282282            boost::filesystem::path searchpath = this->configuration_->pluginPath_;
    283283
     284            // Add that path to the PATH variable in case a plugin depends on another one
     285            std::string pathVariable = getenv("PATH");
     286            putenv(("PATH=" + pathVariable + ";" + configuration_->pluginPath_.string()).c_str());
     287
    284288            boost::filesystem::directory_iterator file(searchpath);
    285289            boost::filesystem::directory_iterator end;
  • code/branches/libraries/src/orxonox/CMakeLists.txt

    r5648 r5649  
    3131ADD_SUBDIRECTORY(gamestates)
    3232ADD_SUBDIRECTORY(interfaces)
     33ADD_SUBDIRECTORY(overlays)
    3334ADD_SUBDIRECTORY(objects)
    34 ADD_SUBDIRECTORY(overlays)
    3535ADD_SUBDIRECTORY(sound)
    3636ADD_SUBDIRECTORY(tools)
Note: See TracChangeset for help on using the changeset viewer.