Changeset 5676
- Timestamp:
- Aug 24, 2009, 1:57:27 PM (15 years ago)
- Location:
- code/branches/resource3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource3/cmake/ParseMacroArguments.cmake
r3196 r5676 36 36 37 37 MACRO(PARSE_MACRO_ARGUMENTS _switches _list_names) 38 39 # Using LIST(FIND ...) speeds up the process 40 SET(_keywords ${_switches} ${_list_names}) 41 38 42 # Parse all the arguments and set the corresponding variable 39 43 # If the option is just a switch, set the variable to its name for later use 40 44 FOREACH(_arg ${ARGN}) 41 SET(_arg_found FALSE)42 45 43 # Switches 44 FOREACH(_switch ${_switches}) 45 IF(${_switch} STREQUAL ${_arg}) 46 SET(_arg_${_switch} ${_switch}) 47 SET(_arg_found TRUE) 48 # Avoid interpreting arguments after this one as options args for the previous one 49 SET(_storage_var) 50 BREAK() 51 ENDIF() 52 ENDFOREACH(_switch) 46 # Is the argument a keyword? 47 LIST(FIND _keywords ${_arg} _keyword_index) 48 IF(NOT _keyword_index EQUAL -1) 53 49 54 # Input options 55 IF(NOT _arg_found) 56 FOREACH(_list_name ${_list_names}) 57 IF(${_list_name} STREQUAL ${_arg}) 58 SET(_storage_var _arg_${_list_name}) 59 SET(_arg_found TRUE) 50 # Another optimisation 51 SET(_arg_found FALSE) 52 # Switches 53 FOREACH(_switch ${_switches}) 54 IF(${_switch} STREQUAL ${_arg}) 55 SET(_arg_${_switch} ${_switch}) 56 SET(_arg_found TRUE) 57 # Avoid interpreting arguments after this one as options args for the previous one 58 SET(_storage_var) 60 59 BREAK() 61 60 ENDIF() 62 ENDFOREACH(_list_name) 63 ENDIF(NOT _arg_found) 61 ENDFOREACH(_switch) 64 62 65 # Arguments of an input option (like source files for SOURCE_FILES) 66 IF(NOT _arg_found) 63 # Input options 64 IF(NOT _arg_found) 65 FOREACH(_list_name ${_list_names}) 66 IF(${_list_name} STREQUAL ${_arg}) 67 SET(_storage_var _arg_${_list_name}) 68 BREAK() 69 ENDIF() 70 ENDFOREACH(_list_name) 71 ENDIF(NOT _arg_found) 72 73 ELSE() 74 75 # Arguments of an input option (like source files for SOURCE_FILES) 67 76 IF(_storage_var) 68 77 # Store in variable define above in the foreach loop … … 71 80 MESSAGE(FATAL_ERROR "ORXONOX_ADD_${_target_type} was given a non compliant argument: ${_arg}") 72 81 ENDIF(_storage_var) 73 ENDIF(NOT _arg_found) 82 83 ENDIF() 74 84 75 85 ENDFOREACH(_arg) -
code/branches/resource3/src/network/CMakeLists.txt
r3304 r5676 35 35 TrafficControl.cc 36 36 ) 37 38 SET_SOURCE_FILES(NETWORK_HDR_FILES 39 ChatListener.h 40 Client.h 41 ClientConnection.h 42 ClientConnectionListener.h 43 ClientInformation.h 44 Connection.h 45 FunctionCallManager.h 46 GamestateClient.h 47 GamestateHandler.h 48 GamestateManager.h 49 Host.h 50 NetworkFunction.h 51 NetworkPrecompiledHeaders.h 52 NetworkPrereqs.h 53 Server.h 54 ServerConnection.h 55 TrafficControl.h 56 ) 57 37 58 ADD_SUBDIRECTORY(packet) 38 59 ADD_SUBDIRECTORY(synchronisable) 39 60 40 61 ORXONOX_ADD_LIBRARY(network 41 FIND_HEADER_FILES42 62 DEFINE_SYMBOL 43 63 "NETWORK_SHARED_BUILD" … … 51 71 core 52 72 SOURCE_FILES 53 ${NETWORK_SRC_FILES} 73 ${NETWORK_SRC_FILES} ${NETWORK_HDR_FILES} 54 74 ) -
code/branches/resource3/src/network/packet/CMakeLists.txt
r3084 r5676 1 1 ADD_SOURCE_FILES(NETWORK_SRC_FILES 2 Packet.cc3 2 Acknowledgement.cc 4 3 Chat.cc … … 8 7 FunctionCalls.cc 9 8 Gamestate.cc 9 Packet.cc 10 10 Welcome.cc 11 11 ) 12 13 ADD_SOURCE_FILES(NETWORK_HDR_FILES 14 Acknowledgement.h 15 Chat.cc 16 Chat.h 17 ClassID.h 18 DeleteObjects.h 19 FunctionCalls.h 20 FunctionIDs.h 21 Gamestate.h 22 Packet.h 23 Welcome.h 24 ) -
code/branches/resource3/src/network/synchronisable/CMakeLists.txt
r2710 r5676 5 5 SynchronisableVariable.cc 6 6 ) 7 8 ADD_SOURCE_FILES(NETWORK_HDR_FILES 9 NetworkCallback.h 10 NetworkCallbackManager.h 11 Synchronisable.h 12 SynchronisableVariable.h 13 ) -
code/branches/resource3/src/util/CMakeLists.txt
r3280 r5676 33 33 ) 34 34 35 SET_SOURCE_FILES(UTIL_HDR_FILES 36 CRC32.h 37 Clipboard.h 38 Convert.h 39 Debug.h 40 Exception.h 41 ExprParser.h 42 Math.h 43 MathConvert.h 44 mbool.h 45 MultiType.h 46 MultiTypeValue.h 47 OgreForwardRefs.h 48 OrxAssert.h 49 OrxEnum.h 50 OutputBuffer.h 51 OutputHandler.h 52 RefToValue.h 53 ScopeGuard.h 54 Serialise.h 55 SignalHandler.h 56 Singleton.h 57 Sleep.h 58 StringUtils.h 59 SubString.h 60 TemplateUtils.h 61 TypeTraits.h 62 UTFStringConversions.h 63 UtilPrereqs.h 64 ) 65 35 66 IF(GCC_NO_SYSTEM_HEADER_SUPPORT) 36 67 # Get around displaying a few hundred lines of warning code … … 39 70 40 71 ORXONOX_ADD_LIBRARY(util 41 FIND_HEADER_FILES42 72 DEFINE_SYMBOL 43 73 "UTIL_SHARED_BUILD" … … 45 75 ${OGRE_LIBRARY} 46 76 SOURCE_FILES 47 ${UTIL_SRC_FILES} 77 ${UTIL_SRC_FILES} ${UTIL_HDR_FILES} 48 78 )
Note: See TracChangeset
for help on using the changeset viewer.