Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7820


Ignore:
Timestamp:
Dec 26, 2010, 9:16:53 PM (14 years ago)
Author:
rgrieder
Message:

Fixed problem with files directly supplied to ORXONOX_ADD_TARGET.

Location:
code/forks/sandbox_qt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/forks/sandbox_qt/cmake/tools/SourceFileUtilities.cmake

    r7805 r7820  
    4242      # Store file with path relative to the root source directory
    4343      FILE(RELATIVE_PATH _file_rel ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
    44       LIST(APPEND _source_files ${_file_rel})
     44      LIST(APPEND _source_files ./${_file_rel})
    4545    ENDIF()
    4646  ENDFOREACH(_file)
  • code/forks/sandbox_qt/cmake/tools/TargetUtilities.cmake

    r7807 r7820  
    125125    ELSE()
    126126      # Default, add source file
    127       SET(_file ${CMAKE_SOURCE_DIR}/${_file})
     127
     128      # Prepare relative paths
     129      IF(NOT _file MATCHES "^(.\\:|\\/)")
     130        # Path can be relative to the current source directory if the file was
     131        # not added with the source file macros. Otherwise there is a "./" at
     132        # the beginning of each file and the filename is relative
     133        # to the CMAKE_SOURCE_DIR
     134        STRING(REGEX REPLACE "^\\.\\/(.+)$" "\\1" _temp ${_file})
     135        IF(NOT ${_temp} STREQUAL ${_file})
     136          SET(_file ${CMAKE_SOURCE_DIR}/${_temp})
     137        ELSE()
     138          SET(_file ${CMAKE_CURRENT_SOURCE_DIR}/${_file})
     139        ENDIF()
     140      ENDIF()
     141
    128142      LIST(APPEND _${_target_name}_source_files ${_file})
    129143
  • code/forks/sandbox_qt/src/CMakeLists.txt

    r7806 r7820  
    7979################## Executable ###################
    8080
    81 SET_SOURCE_FILES(ORXONOX_MAIN_SRC_FILES Orxonox.cc)
    82 
    8381INCLUDE_DIRECTORIES(
    8482  ${CMAKE_CURRENT_SOURCE_DIR}/libraries
     
    9896    orxonox
    9997  SOURCE_FILES
    100     ${ORXONOX_MAIN_SRC_FILES}
     98    Orxonox.cc
    10199  OUTPUT_NAME orxonox
    102100)
Note: See TracChangeset for help on using the changeset viewer.