Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 12, 2013, 11:13:03 PM (11 years ago)
Author:
landauf
Message:

merged testing branch back to trunk. unbelievable it took me 13 months to finish this chore…

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/cmake/tools/TargetUtilities.cmake

    r8729 r9550  
    8282MACRO(ORXONOX_ADD_EXECUTABLE _target_name)
    8383  TU_ADD_TARGET(${_target_name} EXECUTABLE "WIN32" ${ARGN})
     84 
     85  # When using Visual Studio we want to use the output directory as working
     86  # directory and we also want to specify where the external dlls
     87  # (lua, ogre, etc.) are. The problem hereby is that these information cannot
     88  # be specified in CMake because they are not stored in the actual project file.
     89  # This workaround will create a configured *.vcproj.user file that holds the
     90  # right values. When starting the solution for the first time,
     91  # these get written to the *vcproj.yourPCname.yourname.user
     92  IF(MSVC)
     93    IF(MSVC10)
     94      CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/src/template.vcxproj.user.in" "${CMAKE_CURRENT_BINARY_DIR}/${_target_name}.vcxproj.user")
     95    ELSE()
     96      STRING(REGEX REPLACE "^Visual Studio ([0-9][0-9]?).*$" "\\1"
     97             VISUAL_STUDIO_VERSION_SIMPLE "${CMAKE_GENERATOR}")
     98      CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/src/template.vcproj.user.in" "${CMAKE_CURRENT_BINARY_DIR}/${_target_name}.vcproj.user")
     99    ENDIF()
     100  ENDIF(MSVC)
    84101ENDMACRO(ORXONOX_ADD_EXECUTABLE)
    85102
     
    332349  IF(_arg_LINK_LIBS_UNIX AND UNIX)
    333350    TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBS_UNIX})
     351  ENDIF()
     352
     353  # Enable gcov (gcc code coverage analysis tool) if ENABLE_GCOV flag is defined
     354  IF(ENABLE_GCOV)
     355    TARGET_LINK_LIBRARIES(${_target_name} gcov)
     356    ADD_COMPILER_FLAGS("-fprofile-arcs")
     357    ADD_COMPILER_FLAGS("-ftest-coverage")
    334358  ENDIF()
    335359
Note: See TracChangeset for help on using the changeset viewer.