Changeset 9474
- Timestamp:
- Nov 29, 2012, 10:30:42 PM (12 years ago)
- Location:
- code/branches/testing
- Files:
-
- 3 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
code/branches/testing/cmake/tools/TargetUtilities.cmake
r8729 r9474 82 82 MACRO(ORXONOX_ADD_EXECUTABLE _target_name) 83 83 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(CMAKE_CL_64) 94 SET(MSVC_PLATFORM "x64") 95 ELSE() 96 SET(MSVC_PLATFORM "Win32") 97 ENDIF() 98 IF(MSVC10) 99 CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/src/template.vcxproj.user.in" "${CMAKE_CURRENT_BINARY_DIR}/${_target_name}.vcxproj.user") 100 ELSE() 101 STRING(REGEX REPLACE "^Visual Studio ([0-9][0-9]?).*$" "\\1" 102 VISUAL_STUDIO_VERSION_SIMPLE "${CMAKE_GENERATOR}") 103 CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/src/template.vcproj.user.in" "${CMAKE_CURRENT_BINARY_DIR}/${_target_name}.vcproj.user") 104 ENDIF() 105 ENDIF(MSVC) 84 106 ENDMACRO(ORXONOX_ADD_EXECUTABLE) 85 107 -
code/branches/testing/src/CMakeLists.txt
r9473 r9474 78 78 79 79 80 # When using Visual Studio we want to use the output directory as working81 # directory and we also want to specify where the external dlls82 # (lua, ogre, etc.) are. The problem hereby is that these information cannot83 # be specified in CMake because they are not stored in the actual project file.84 # This workaround will create a configured *.vcproj.user file that holds the85 # right values. When starting the solution for the first time,86 # these get written to the *vcproj.yourPCname.yourname.user87 80 IF(MSVC) 88 81 IF(CMAKE_CL_64) … … 90 83 ELSE() 91 84 SET(MSVC_PLATFORM "Win32") 92 ENDIF()93 IF(MSVC10)94 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/orxonox-main.vcxproj.user.in" "${CMAKE_CURRENT_BINARY_DIR}/orxonox-main.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_CURRENT_SOURCE_DIR}/orxonox-main.vcproj.user.in" "${CMAKE_CURRENT_BINARY_DIR}/orxonox-main.vcproj.user")99 85 ENDIF() 100 86 ENDIF(MSVC) -
code/branches/testing/test/util/CMakeLists.txt
r9221 r9474 1 ADD_EXECUTABLE(1 ORXONOX_ADD_EXECUTABLE( 2 2 util_test 3 3 EXCLUDE_FROM_ALL 4 NO_INSTALL 5 LINK_LIBRARIES 6 util 7 gmock_orxonox 8 SOURCE_FILES 4 9 ${GMOCK_MAIN} 5 10 ConvertTest.cc … … 15 20 VA_NARGSTest.cc 16 21 ) 17 TARGET_LINK_LIBRARIES(util_test util gmock_orxonox)18 22 ADD_DEPENDENCIES(test util_test) 19 23 20 24 ADD_TEST(util_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/util_test) 21 22 #-----------------23 24 IF(MSVC)25 IF(CMAKE_CL_64)26 SET(MSVC_PLATFORM "x64")27 ELSE()28 SET(MSVC_PLATFORM "Win32")29 ENDIF()30 IF(MSVC10)31 CONFIGURE_FILE("../../src/orxonox-main.vcxproj.user.in" "${CMAKE_CURRENT_BINARY_DIR}/util_test.vcxproj.user")32 ELSE()33 STRING(REGEX REPLACE "^Visual Studio ([0-9][0-9]?).*$" "\\1"34 VISUAL_STUDIO_VERSION_SIMPLE "${CMAKE_GENERATOR}")35 CONFIGURE_FILE("../../src/orxonox-main.vcproj.user.in" "${CMAKE_CURRENT_BINARY_DIR}/util_test.vcproj.user")36 ENDIF()37 ENDIF(MSVC)
Note: See TracChangeset
for help on using the changeset viewer.