Changeset 8351 for code/trunk/cmake/tools
- Timestamp:
- Apr 28, 2011, 7:15:14 AM (14 years ago)
- Location:
- code/trunk/cmake/tools
- Files:
-
- 1 deleted
- 9 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/cmake/tools/CheckOGREPlugins.cmake
r8264 r8351 52 52 NAMES ${_plugin} 53 53 PATHS $ENV{OGRE_HOME} $ENV{OGRE_PLUGIN_DIR} 54 PATH_SUFFIXES bin/Release bin/release Release release lib lib/OGRE bin 54 PATH_SUFFIXES bin/Release bin/release Release release lib lib/OGRE bin Ogre.framework/Resources 55 55 ) 56 56 FIND_LIBRARY(OGRE_PLUGIN_${_plugin}_DEBUG 57 57 NAMES ${_plugin}d ${_plugin}_d ${_plugin} 58 58 PATHS $ENV{OGRE_HOME} $ENV{OGRE_PLUGIN_DIR} 59 PATH_SUFFIXES bin/Debug bin/debug Debug debug lib lib/OGRE bin 59 PATH_SUFFIXES bin/Debug bin/debug Debug debug lib lib/OGRE bin Ogre.framework/Resources 60 60 ) 61 61 # We only need at least one render system. Check at the end. -
code/trunk/cmake/tools/FindALUT.cmake
r7163 r8351 1 # - Locate FreeAlut 2 # This module defines 3 # ALUT_LIBRARY 4 # ALUT_FOUND, if false, do not try to link against Alut 5 # ALUT_INCLUDE_DIR, where to find the headers 6 # 7 # $ALUTDIR is an environment variable that would 8 # correspond to the ./configure --prefix=$ALUTDIR 9 # used in building Alut. 10 # 11 # Created by Eric Wing. This was influenced by the FindSDL.cmake module. 12 # On OSX, this will prefer the Framework version (if found) over others. 13 # People will have to manually change the cache values of 14 # ALUT_LIBRARY to override this selection. 15 # Tiger will include OpenAL as part of the System. 16 # But for now, we have to look around. 17 # Other (Unix) systems should be able to utilize the non-framework paths. 18 # 19 # Several changes and additions by Fabian 'x3n' Landau 20 # Some simplifications by Adrian Friedli and Reto Grieder 21 # > www.orxonox.net < 1 # 2 # ORXONOX - the hottest 3D action shooter ever to exist 3 # > www.orxonox.net < 4 # 5 # This program is free software; you can redistribute it and/or 6 # modify it under the terms of the GNU General Public License 7 # as published by the Free Software Foundation; either version 2 8 # of the License, or (at your option) any later version. 9 # 10 # This program is distributed in the hope that it will be useful, 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # GNU General Public License for more details. 14 # 15 # You should have received a copy of the GNU General Public License along 16 # with this program; if not, write to the Free Software Foundation, 17 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 # 19 # 20 # Author: 21 # Kevin Young 22 # Description: 23 # Variables defined: 24 # ALUT_FOUND 25 # ALUT_INCLUDE_DIR 26 # ALUT_LIBRARY 27 # 22 28 23 29 INCLUDE(FindPackageHandleStandardArgs) 24 30 INCLUDE(HandleLibraryTypes) 25 31 26 FIND_PATH(ALUT_INCLUDE_DIR AL/alut.h 27 PATHS 28 $ENV{ALUTDIR} 29 ~/Library/Frameworks/OpenAL.framework 30 /Library/Frameworks/OpenAL.framework 31 /System/Library/Frameworks/OpenAL.framework # Tiger 32 PATH_SUFFIXES include include/OpenAL include/AL Headers 32 FIND_PATH(ALUT_INCLUDE_DIR alut.h 33 PATHS $ENV{ALUTDIR} 34 PATH_SUFFIXES include include/AL 33 35 ) 34 35 # I'm not sure if I should do a special casing for Apple. It is 36 # unlikely that other Unix systems will find the framework path. 37 # But if they do ([Next|Open|GNU]Step?), 38 # do they want the -framework option also? 39 IF(${ALUT_INCLUDE_DIR} MATCHES ".framework") 40 41 STRING(REGEX REPLACE "(.*)/.*\\.framework/.*" "\\1" ALUT_FRAMEWORK_PATH_TMP ${ALUT_INCLUDE_DIR}) 42 IF("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks" 43 OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks" 44 ) 45 # String is in default search path, don't need to use -F 46 SET (ALUT_LIBRARY_OPTIMIZED "-framework OpenAL" CACHE STRING "OpenAL framework for OSX") 47 ELSE() 48 # String is not /Library/Frameworks, need to use -F 49 SET(ALUT_LIBRARY_OPTIMIZED "-F${ALUT_FRAMEWORK_PATH_TMP} -framework OpenAL" CACHE STRING "OpenAL framework for OSX") 50 ENDIF() 51 # Clear the temp variable so nobody can see it 52 SET(ALUT_FRAMEWORK_PATH_TMP "" CACHE INTERNAL "") 53 54 ELSE() 55 FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED 56 NAMES alut 57 PATHS $ENV{ALUTDIR} 58 PATH_SUFFIXES lib libs 59 ) 60 FIND_LIBRARY(ALUT_LIBRARY_DEBUG 61 NAMES alutd alut_d alutD alut_D 62 PATHS $ENV{ALUTDIR} 63 PATH_SUFFIXES lib libs 64 ) 65 ENDIF() 36 FIND_LIBRARY(ALUT_LIBRARY_OPTIMIZED 37 NAMES alut ALUT 38 PATHS $ENV{ALUTDIR} 39 PATH_SUFFIXES lib bin/Release bin/release Release release ALUT 40 ) 41 FIND_LIBRARY(ALUT_LIBRARY_DEBUG 42 NAMES alutd alut_d alutD alut_D ALUTd ALUT_d ALUTD ALUT_D 43 PATHS $ENV{ALUTDIR} 44 PATH_SUFFIXES lib bin/Debug bin/debug Debug debug ALUT 45 ) 66 46 67 47 # Handle the REQUIRED argument and set ALUT_FOUND 68 48 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ALUT DEFAULT_MSG 69 70 49 ALUT_LIBRARY_OPTIMIZED 50 ALUT_INCLUDE_DIR 71 51 ) 72 52 … … 75 55 76 56 MARK_AS_ADVANCED( 77 78 79 57 ALUT_INCLUDE_DIR 58 ALUT_LIBRARY_OPTIMIZED 59 ALUT_LIBRARY_DEBUG 80 60 ) -
code/trunk/cmake/tools/FindCEGUI.cmake
r7163 r8351 4 4 # CEGUI_INCLUDE_DIR 5 5 # CEGUI_LIBRARY, the library to link against to use CEGUI. 6 # CEGUILUA_LIBRARY, the library to link against to use the CEGUI script module. 7 # CEGUI_TOLUA_LIBRARY, the library to link against to use Tolua++. 6 8 # CEGUI_FOUND, If false, do not try to use CEGUI 7 9 # CEGUI_VERSION, the version as string "x.y.z" 8 # CEGUILUA_LIBRARY, Script module library9 # CEGUILUA_USE_INTERNAL_LIBRARY, True if CEGUILUA_LIBRARY was not defined here10 10 # 11 11 # Input: 12 12 # ENV{CEGUIDIR}, CEGUI path, optional 13 # FIND CEGUILUA_INTERNAL_SUPPORT, List of all CEGUILua version supported14 # in the source repository15 # CEGUILUA_USE_EXTERNAL_LIBRARY, Force finding of CEGUILua16 13 # 17 14 # Created by Matt Williams to find OGRE libraries … … 29 26 # > www.orxonox.net < 30 27 28 INCLUDE(CompareVersionStrings) 31 29 INCLUDE(DetermineVersion) 32 30 INCLUDE(FindPackageHandleAdvancedArgs) 33 31 INCLUDE(HandleLibraryTypes) 34 32 33 # Find CEGUI headers 35 34 FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h 36 35 PATHS $ENV{CEGUIDIR} 37 PATH_SUFFIXES include include/CEGUI CEGUI.framework/Headers36 PATH_SUFFIXES include include/CEGUI 38 37 ) 38 39 # Inspect CEGUIVersion.h for the version number 40 DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h) 41 42 # Find CEGUI library 39 43 FIND_LIBRARY(CEGUI_LIBRARY_OPTIMIZED 40 44 NAMES CEGUIBase CEGUI … … 50 54 ) 51 55 52 # Inspect CEGUIVersion.h for the version number 53 DETERMINE_VERSION(CEGUI ${CEGUI_INCLUDE_DIR}/CEGUIVersion.h) 56 # Find CEGUILua headers 57 FIND_PATH(CEGUILUA_INCLUDE_DIR CEGUILua.h 58 PATHS 59 $ENV{CEGUIDIR} 60 $ENV{CEGUILUADIR} 61 ${CEGUI_INCLUDE_DIR}/ScriptingModules/LuaScriptModule 62 PATH_SUFFIXES include include/CEGUI 63 ) 64 # Find CEGUILua libraries 65 FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED 66 NAMES CEGUILua CEGUILuaScriptModule 67 PATHS $ENV{CEGUIDIR} $ENV{CEGUILUADIR} 68 PATH_SUFFIXES lib bin 69 ) 70 FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG 71 NAMES CEGUILuad CEGUILua_d CEGUILuaScriptModuled CEGUILuaScriptModule_d 72 PATHS $ENV{CEGUIDIR} $ENV{CEGUILUADIR} 73 PATH_SUFFIXES lib bin 74 ) 75 76 # Find CEGUI Tolua++ include file 77 # We only need to add this path since we use tolua++ like a normal 78 # dependency but it is shipped with CEGUILua. 79 FIND_PATH(CEGUI_TOLUA_INCLUDE_DIR tolua++.h 80 PATHS 81 ${CEGUILUA_INCLUDE_DIR} 82 # For newer CEGUI versions >= 0.7 83 ${CEGUILUA_INCLUDE_DIR}/support/tolua++ 84 # For Mac OS X, tolua++ is a separate framework in the dependency package 85 ${DEP_FRAMEWORK_DIR} 86 NO_DEFAULT_PATH # Don't attempt to find tolua++ installed on the system 87 ) 88 # Find CEGUI Tolua++ libraries 89 FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_OPTIMIZED 90 NAMES CEGUItoluapp tolua++ ceguitolua++ 91 PATHS $ENV{CEGUIDIR} ${CEGUITOLUADIR} 92 PATH_SUFFIXES lib bin 93 ) 94 FIND_LIBRARY(CEGUI_TOLUA_LIBRARY_DEBUG 95 NAMES CEGUItoluappd CEGUItoluapp_d tolua++d tolua++_d 96 PATHS $ENV{CEGUIDIR} ${CEGUITOLUADIR} 97 PATH_SUFFIXES lib bin 98 ) 99 100 # Newer versions of CEGUI have the renderer for OGRE shipped with them 101 COMPARE_VERSION_STRINGS("${CEGUI_VERSION}" "0.7" _version_compare TRUE) 102 IF(_version_compare GREATER -1) 103 # Find CEGUI OGRE Renderer headers 104 FIND_PATH(CEGUI_OGRE_RENDERER_INCLUDE_DIR CEGUIOgreRenderer.h 105 PATHS 106 $ENV{CEGUIDIR} 107 $ENV{CEGUIOGRERENDERERDIR} 108 ${CEGUI_INCLUDE_DIR}/RendererModules/Ogre 109 PATH_SUFFIXES include include/CEGUI 110 ) 111 # Find CEGUI OGRE Renderer libraries 112 FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED 113 NAMES CEGUIOgreRenderer 114 PATHS $ENV{CEGUIDIR} $ENV{CEGUIOGRERENDERERDIR} 115 PATH_SUFFIXES lib bin 116 ) 117 FIND_LIBRARY(CEGUI_OGRE_RENDERER_LIBRARY_DEBUG 118 NAMES CEGUIOgreRendererd CEGUIOgreRenderer_d 119 PATHS $ENV{CEGUIDIR} $ENV{CEGUIOGRERENDERERDIR} 120 PATH_SUFFIXES lib bin 121 ) 122 SET(CEGUI_OGRE_RENDERER_REQUIRED_VARIABLES 123 CEGUI_OGRE_RENDERER_INCLUDE_DIR 124 CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED 125 ) 126 ELSE() 127 SET(CEGUI_OLD_VERSION TRUE) 128 SET(CEGUI_OGRE_RENDERER_BUILD_REQUIRED TRUE) 129 ENDIF() 54 130 55 131 # Handle the REQUIRED argument and set CEGUI_FOUND 56 132 # Also checks the version requirements if given 57 133 FIND_PACKAGE_HANDLE_ADVANCED_ARGS(CEGUI DEFAULT_MSG "${CEGUI_VERSION}" 134 CEGUI_INCLUDE_DIR 58 135 CEGUI_LIBRARY_OPTIMIZED 59 CEGUI_INCLUDE_DIR 136 CEGUILUA_INCLUDE_DIR 137 CEGUILUA_LIBRARY_OPTIMIZED 138 CEGUI_TOLUA_INCLUDE_DIR 139 CEGUI_TOLUA_LIBRARY_OPTIMIZED 140 ${CEGUI_OGRE_RENDERER_REQUIRED_VARIABLES} 60 141 ) 61 142 62 143 # Collect optimized and debug libraries 63 144 HANDLE_LIBRARY_TYPES(CEGUI) 145 HANDLE_LIBRARY_TYPES(CEGUILUA) 146 HANDLE_LIBRARY_TYPES(CEGUI_TOLUA) 147 IF(NOT CEGUI_OGRE_RENDERER_BUILD_REQUIRED) 148 HANDLE_LIBRARY_TYPES(CEGUI_OGRE_RENDERER) 149 ENDIF() 64 150 65 151 MARK_AS_ADVANCED( … … 67 153 CEGUI_LIBRARY_OPTIMIZED 68 154 CEGUI_LIBRARY_DEBUG 155 CEGUILUA_INCLUDE_DIR 156 CEGUILUA_LIBRARY_OPTIMIZED 157 CEGUILUA_LIBRARY_DEBUG 158 CEGUI_TOLUA_INCLUDE_DIR 159 CEGUI_TOLUA_LIBRARY_OPTIMIZED 160 CEGUI_TOLUA_LIBRARY_DEBUG 161 CEGUI_OGRE_RENDERER_INCLUDE_DIR 162 CEGUI_OGRE_RENDERER_LIBRARY_OPTIMIZED 163 CEGUI_OGRE_RENDERER_LIBRARY_DEBUG 69 164 ) 70 71 LIST(FIND CEGUILUA_INTERNAL_SUPPORT "${CEGUI_VERSION}" _find_result)72 IF(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1)73 # Also try to find the CEGUILua libraries.74 # There would already be libraries in src/ for versions 0.5 and 0.675 FIND_LIBRARY(CEGUILUA_LIBRARY_OPTIMIZED76 NAMES CEGUILua77 PATHS $ENV{CEGUIDIR}78 PATH_SUFFIXES lib bin79 )80 FIND_LIBRARY(CEGUILUA_LIBRARY_DEBUG81 NAMES CEGUILuad CEGUILua_d82 PATHS $ENV{CEGUIDIR}83 PATH_SUFFIXES lib bin84 )85 86 SET(CEGUILua_FIND_REQUIRED ${CEGUI_FIND_REQUIRED})87 # Handle the REQUIRED argument and set CEGUILUA_FOUND88 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CEGUILua DEFAULT_MSG89 CEGUILUA_LIBRARY_OPTIMIZED90 )91 92 # Collect optimized and debug libraries93 HANDLE_LIBRARY_TYPES(CEGUILUA)94 95 MARK_AS_ADVANCED(96 CEGUILUA_LIBRARY_OPTIMIZED97 CEGUILUA_LIBRARY_DEBUG98 )99 100 ELSE(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1)101 SET(CEGUILUA_USE_INTERNAL_LIBRARY TRUE)102 ENDIF(CEGUILUA_USE_EXTERNAL_LIBRARY OR _find_result EQUAL -1)103 -
code/trunk/cmake/tools/FindOGRE.cmake
r7163 r8351 23 23 FIND_PATH(OGRE_INCLUDE_DIR Ogre.h 24 24 PATHS $ENV{OGRE_HOME} 25 PATH_SUFFIXES include include/OGRE Ogre.framework/Headers25 PATH_SUFFIXES include include/OGRE 26 26 ) 27 27 FIND_LIBRARY(OGRE_LIBRARY_OPTIMIZED … … 33 33 NAMES OgreMaind OgreMain_d OgreMainD OgreMain_D Ogred Ogre_d OgreD Ogre_d 34 34 PATHS $ENV{OGRE_HOME} 35 PATH_SUFFIXES lib bin/Debug bin/debug Debug debug Versions/A35 PATH_SUFFIXES lib bin/Debug bin/debug Debug debug 36 36 ) 37 37 -
code/trunk/cmake/tools/FindOgg.cmake
r7163 r8351 22 22 ) 23 23 FIND_LIBRARY(OGG_LIBRARY_OPTIMIZED 24 NAMES ogg 24 NAMES ogg ogg-0 libogg 25 25 PATHS $ENV{OGGDIR} 26 26 PATH_SUFFIXES lib 27 27 ) 28 28 FIND_LIBRARY(OGG_LIBRARY_DEBUG 29 NAMES oggd ogg_d oggD ogg_D 29 NAMES oggd ogg_d oggD ogg_D libogg_d 30 30 PATHS $ENV{OGGDIR} 31 31 PATH_SUFFIXES lib -
code/trunk/cmake/tools/FindPOCO.cmake
r7285 r8351 29 29 FIND_PATH(POCO_INCLUDE_DIR Poco/Poco.h 30 30 PATHS $ENV{POCODIR} 31 PATH_SUFFIXES include 31 PATH_SUFFIXES include Foundation/include 32 32 ) 33 33 FIND_LIBRARY(POCO_LIBRARY_OPTIMIZED -
code/trunk/cmake/tools/FindVorbis.cmake
r7163 r8351 22 22 ) 23 23 FIND_LIBRARY(VORBIS_LIBRARY_OPTIMIZED 24 NAMES vorbis 24 NAMES vorbis vorbis-0 libvorbis 25 25 PATHS $ENV{VORBISDIR} 26 26 PATH_SUFFIXES lib 27 27 ) 28 28 FIND_LIBRARY(VORBIS_LIBRARY_DEBUG 29 NAMES vorbisd vorbis_d vorbisD vorbis_D 29 NAMES vorbisd vorbis_d vorbisD vorbis_D libvorbis_d 30 30 PATHS $ENV{VORBISDIR} 31 31 PATH_SUFFIXES lib 32 32 ) 33 33 FIND_LIBRARY(VORBISFILE_LIBRARY_OPTIMIZED 34 NAMES vorbisfile 34 NAMES vorbisfile vorbisfile-3 libvorbisfile 35 35 PATHS $ENV{VORBISDIR} 36 36 PATH_SUFFIXES lib 37 37 ) 38 38 FIND_LIBRARY(VORBISFILE_LIBRARY_DEBUG 39 NAMES vorbisfiled vorbisfile_d vorbisfileD vorbisfile_D 39 NAMES vorbisfiled vorbisfile_d vorbisfileD vorbisfile_D libvorbisfile_d 40 40 PATHS $ENV{VORBISDIR} 41 41 PATH_SUFFIXES lib -
code/trunk/cmake/tools/GenerateToluaBindings.cmake
r7415 r8351 32 32 # RUNTIME_LIBRARY_DIRECTORY - Working directory 33 33 # 34 35 # Workaround for XCode: The folder where the bind files are written to has 36 # to be present beforehand. 37 # We have to do this here because the header files are all stored in a single 38 # location per configuration. 39 IF(CMAKE_CONFIGURATION_TYPES) 40 FOREACH(_dir ${CMAKE_CONFIGURATION_TYPES}) 41 FILE(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/src/toluabind/${_dir}") 42 ENDFOREACH(_dir) 43 ENDIF() 34 44 35 45 FUNCTION(GENERATE_TOLUA_BINDINGS _tolua_package _target_source_files) -
code/trunk/cmake/tools/TargetUtilities.cmake
r8079 r8351 43 43 # Lists: 44 44 # LINK_LIBRARIES: Redirects to TARGET_LINK_LIBRARIES 45 # LINK_LIBS_LINUX: Redirects to TARGET_LINK_LIBRARIES only on Linux 46 # LINK_LIBS_WIN32: Redirects to TARGET_LINK_LIBRARIES only on Windows 47 # LINK_LIBS_APPLE: Redirects to TARGET_LINK_LIBRARIES only on Apple 48 # LINK_LIBS_UNIX: Redirects to TARGET_LINK_LIBRARIES only on UNIX 45 49 # VERSION: Set version to the binary 46 50 # SOURCE_FILES: Source files for the target … … 53 57 # This function also installs the target! 54 58 # Prerequisistes: 55 # ORXONOX_DEFAULT_LINK , ORXONOX_CONFIG_FILES59 # ORXONOX_DEFAULT_LINK 56 60 # Parameters: 57 61 # _target_name, ARGN for the macro arguments … … 86 90 SET(_list_names LINK_LIBRARIES VERSION SOURCE_FILES 87 91 DEFINE_SYMBOL TOLUA_FILES PCH_FILE 88 PCH_EXCLUDE OUTPUT_NAME) 92 PCH_EXCLUDE OUTPUT_NAME LINK_LIBS_LINUX 93 LINK_LIBS_WIN32 LINK_LIBS_APPLE LINK_LIBS_UNIX) 89 94 90 95 PARSE_MACRO_ARGUMENTS("${_switches}" "${_list_names}" ${ARGN}) … … 104 109 MESSAGE(FATAL_ERROR "No name provided for source file compilation") 105 110 ENDIF() 106 IF(NOT _compilation_include_string)107 MESSAGE(STATUS "Warning: Empty source file compilation!")108 ENDIF()109 111 IF(NOT DISABLE_COMPILATIONS) 112 IF(NOT _compilation_include_string) 113 MESSAGE(STATUS "Warning: Empty source file compilation!") 114 ENDIF() 110 115 IF(EXISTS ${_compilation_file}) 111 116 FILE(READ ${_compilation_file} _include_string_file) … … 169 174 GENERATE_TOLUA_BINDINGS(${_target_name_capitalised} _${_target_name}_files 170 175 INPUTFILES ${_arg_TOLUA_FILES}) 176 # Workaround for XCode: The folder where the bind files are written to has 177 # to be present beforehand. 178 IF(CMAKE_CONFIGURATION_TYPES) 179 FOREACH(_dir ${CMAKE_CONFIGURATION_TYPES}) 180 FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_dir}) 181 ENDFOREACH(_dir) 182 ENDIF() 171 183 ENDIF() 172 184 … … 192 204 193 205 IF(NOT _arg_ORXONOX_EXTERNAL) 194 # Move the prereqs.h file to the configsection206 # Move the ...Prereqs.h and the PCH files to the 'Config' section 195 207 IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_target_name_capitalised}Prereqs.h) 196 208 SOURCE_GROUP("Config" FILES ${_target_name_capitalised}Prereqs.h) 197 209 ENDIF() 198 # Add config files to the config section199 LIST(APPEND _${_target_name}_files ${ORXONOX_CONFIG_FILES})200 SOURCE_GROUP("Config" FILES ${ORXONOX_CONFIG_FILES})210 IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_arg_PCH_FILE}) 211 SOURCE_GROUP("Config" FILES ${CMAKE_CURRENT_SOURCE_DIR}/${_arg_PCH_FILE}) 212 ENDIF() 201 213 ENDIF() 202 214 ENDIF() … … 217 229 IF(_arg_ORXONOX_EXTERNAL) 218 230 REMOVE_COMPILER_FLAGS("-W3 -W4" MSVC) 219 ADD_COMPILER_FLAGS("-w") 231 ADD_COMPILER_FLAGS("-w" NOT MSVC) 232 ADD_COMPILER_FLAGS("-W0" MSVC) 220 233 ENDIF() 221 234 222 235 # Don't compile header files 223 236 FOREACH(_file ${_${_target_name}_files}) 224 IF(NOT _file MATCHES "\\.(c|cc|cpp|cxx )$")237 IF(NOT _file MATCHES "\\.(c|cc|cpp|cxx|mm)$") 225 238 SET_SOURCE_FILES_PROPERTIES(${_file} PROPERTIES HEADER_FILE_ONLY TRUE) 226 239 ENDIF() … … 278 291 TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBRARIES}) 279 292 ENDIF() 293 IF(_arg_LINK_LIBS_LINUX AND LINUX) 294 TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBS_LINUX}) 295 ENDIF() 296 IF(_arg_LINK_LIBS_WIN32 AND WIN32) 297 TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBS_WIN32}) 298 ENDIF() 299 IF(_arg_LINK_LIBS_APPLE AND APPLE) 300 TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBS_APPLE}) 301 ENDIF() 302 IF(_arg_LINK_LIBS_UNIX AND UNIX) 303 TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBS_UNIX}) 304 ENDIF() 305 306 # RPATH settings for the installation 307 IF("${_target_type}" STREQUAL "LIBRARY") 308 IF(_arg_MODULE) 309 SET(_rpath "${MODULE_RPATH}") 310 ELSE() 311 SET(_rpath "${LIBRARY_RPATH}") 312 ENDIF() 313 ELSE() 314 SET(_rpath "${RUNTIME_RPATH}") 315 ENDIF() 316 SET_TARGET_PROPERTIES(${_target_name} PROPERTIES INSTALL_RPATH "${_rpath}") 280 317 281 318 # DEFINE_SYMBOL
Note: See TracChangeset
for help on using the changeset viewer.