diff --git a/code/CMakeModules/PCHSupport.cmake b/code/CMakeModules/PCHSupport.cmake index 92b76513b..37f413cbd 100644 --- a/code/CMakeModules/PCHSupport.cmake +++ b/code/CMakeModules/PCHSupport.cmake @@ -33,17 +33,29 @@ MACRO(PCH_SET_COMPILE_FLAGS _target) SET(PCH_ARCHS) SET(_FLAGS) - LIST(APPEND _FLAGS ${CMAKE_CXX_FLAGS}) + # C++ flags + SET(_FLAG ${CMAKE_CXX_FLAGS}) + SEPARATE_ARGUMENTS(_FLAG) + + LIST(APPEND _FLAGS ${_FLAG}) + + # C++ config flags STRING(TOUPPER "${CMAKE_BUILD_TYPE}" _UPPER_BUILD) - LIST(APPEND _FLAGS " ${CMAKE_CXX_FLAGS_${_UPPER_BUILD}}") + + SET(_FLAG ${CMAKE_CXX_FLAGS_${_UPPER_BUILD}}) + SEPARATE_ARGUMENTS(_FLAG) + + LIST(APPEND _FLAGS ${_FLAG}) GET_TARGET_PROPERTY(_targetType ${_target} TYPE) SET(_USE_PIC OFF) IF(${_targetType} STREQUAL "SHARED_LIBRARY" OR ${_targetType} STREQUAL "MODULE_LIBRARY") - LIST(APPEND _FLAGS " ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}") + SET(_FLAG ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}) + SEPARATE_ARGUMENTS(_FLAG) + LIST(APPEND _FLAGS ${_FLAG}) ELSE() GET_TARGET_PROPERTY(_pic ${_target} POSITION_INDEPENDENT_CODE) IF(_pic) @@ -53,7 +65,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target) GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES) FOREACH(item ${DIRINC}) - LIST(APPEND _FLAGS " -I\"${item}\"") + LIST(APPEND _FLAGS -I"${item}") ENDFOREACH() # NOTE: As cmake files (eg FindQT4) may now use generator expressions around their defines that evaluate @@ -92,18 +104,18 @@ MACRO(PCH_SET_COMPILE_FLAGS _target) GET_TARGET_PROPERTY(oldProps ${_target} COMPILE_FLAGS) IF(oldProps) - LIST(APPEND _FLAGS " ${oldProps}") + LIST(APPEND _FLAGS ${oldProps}) ENDIF() GET_TARGET_PROPERTY(oldPropsBuild ${_target} COMPILE_FLAGS_${_UPPER_BUILD}) IF(oldPropsBuild) - LIST(APPEND _FLAGS " ${oldPropsBuild}") + LIST(APPEND _FLAGS ${oldPropsBuild}) ENDIF() GET_TARGET_PROPERTY(DIRINC ${_target} INCLUDE_DIRECTORIES) IF(DIRINC) FOREACH(item ${DIRINC}) - LIST(APPEND _FLAGS " -I\"${item}\"") + LIST(APPEND _FLAGS -I"${item}") ENDFOREACH() ENDIF() @@ -130,7 +142,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target) IF(_DIRS) FOREACH(item ${_DIRS}) - LIST(APPEND GLOBAL_DEFINITIONS " -I\"${item}\"") + LIST(APPEND GLOBAL_DEFINITIONS -I"${item}") ENDFOREACH() ENDIF() @@ -159,24 +171,21 @@ MACRO(PCH_SET_COMPILE_FLAGS _target) ENDIF() IF(_USE_PIC) - LIST(APPEND _FLAGS " ${CMAKE_CXX_COMPILE_OPTIONS_PIC}") + LIST(APPEND _FLAGS ${CMAKE_CXX_COMPILE_OPTIONS_PIC}) ENDIF() ENDIF() IF(CMAKE_VERSION VERSION_LESS "3.3.0") GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS) GET_DIRECTORY_PROPERTY(_directory_definitions DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS) - LIST(APPEND _FLAGS " ${_directory_flags}") - LIST(APPEND _FLAGS " ${_directory_definitions}") + LIST(APPEND _FLAGS ${_directory_flags}) + LIST(APPEND _FLAGS ${_directory_definitions}) ENDIF() # Format definitions IF(MSVC) # Fix path with space SEPARATE_ARGUMENTS(_FLAGS UNIX_COMMAND "${_FLAGS}") - ELSE() - STRING(REGEX REPLACE " +" " " _FLAGS ${_FLAGS}) - SEPARATE_ARGUMENTS(_FLAGS) ENDIF() # Already in list form and items may contain non-leading spaces that should not be split on @@ -238,6 +247,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target) ENDIF() IF(PCH_FLAGS) + LIST(REMOVE_ITEM PCH_FLAGS "") LIST(REMOVE_DUPLICATES PCH_FLAGS) ENDIF() ENDMACRO() diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index 711ecb94c..1c8abfe5e 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -68,11 +68,30 @@ MACRO(NL_DEFAULT_PROPS name label) ENDIF(${type} STREQUAL SHARED_LIBRARY) IF(${type} STREQUAL EXECUTABLE AND WIN32 AND NOT MINGW) + # check if using a GUI + GET_TARGET_PROPERTY(_VALUE ${name} WIN32_EXECUTABLE) + + IF(TARGET_X64) + # Target Windows XP 64 bits + SET(_SUBSYSTEM_VERSION "5.02") + ELSE() + # Target Windows XP + SET(_SUBSYSTEM_VERSION "5.01") + ENDIF() + + IF(_VALUE) + # GUI + SET(_SUBSYSTEM "WINDOWS") + ELSE() + # Console + SET(_SUBSYSTEM "CONSOLE") + ENDIF() + SET_TARGET_PROPERTIES(${name} PROPERTIES VERSION ${NL_VERSION} SOVERSION ${NL_VERSION_MAJOR} COMPILE_FLAGS "/GA" - LINK_FLAGS "/VERSION:${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}") + LINK_FLAGS "/VERSION:${NL_VERSION_MAJOR}.${NL_VERSION_MINOR} /SUBSYSTEM:${_SUBSYSTEM},${_SUBSYSTEM_VERSION}") ENDIF(${type} STREQUAL EXECUTABLE AND WIN32 AND NOT MINGW) ENDMACRO(NL_DEFAULT_PROPS) diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_action_simple_dynamic_effect.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_action_simple_dynamic_effect.cpp index ffd46e363..ea819763c 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_action_simple_dynamic_effect.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_action_simple_dynamic_effect.cpp @@ -88,7 +88,7 @@ void CCombatActionDynamicEffect::applyOnEntity( CEntityBase *entity, float succe TGameCycle endDate; if ( _UsePhraseLatencyAsDuration == true && _CombatPhrase != 0) { - endDate = (TGameCycle) _CombatPhrase->latencyEndDate(); + endDate = (TGameCycle)_CombatPhrase->latencyEndDate(); } else { diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_attacker.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_attacker.cpp index fa8bdb1ff..ef03e645a 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_attacker.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_attacker.cpp @@ -130,7 +130,7 @@ CCombatWeapon::CCombatWeapon(CGameItemPtr itemPtr) // weapon hit rate is in hit/10s and we use ticks/hits.... if (itemPtr->hitRate() != 0) { - LatencyInTicks = (10.0 / itemPtr->hitRate() ) / CTickEventHandler::getGameTimeStep(); + LatencyInTicks = (10.0 / itemPtr->hitRate() ) / CTickEventHandler::getGameTimeStep(); } Quality = (uint16)itemPtr->recommended(); diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_phrase.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_phrase.cpp index 6dfd7a6b2..924c3b0f9 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/combat_phrase.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/combat_phrase.cpp @@ -2177,7 +2177,7 @@ bool CCombatPhrase::launch() // set latency end date const NLMISC::TGameCycle time = CTickEventHandler::getGameCycle(); - if(_LatencyEndDate > 0) + if (_LatencyEndDate > 0) { _LatencyEndDate += latency; } diff --git a/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp b/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp index e3a6969fd..cd153c5ad 100644 --- a/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp +++ b/code/ryzom/server/src/entities_game_service/phrase_manager/fg_prospection_phrase.cpp @@ -716,7 +716,7 @@ void CFgProspectionPhrase::apply() MBEHAV::CBehaviour behav = player->getBehaviour(); // keep arguments behav.Behaviour = MBEHAV::PROSPECTING_END; PHRASE_UTILITIES::sendUpdateBehaviour( _ActorRowId, behav ); - _LatencyEndDate =(double)ForageSourceSpawnDelay.get(); // wait a short time before spawning the source(s) (to let animation/fx time) + _LatencyEndDate = (double)ForageSourceSpawnDelay.get(); // wait a short time before spawning the source(s) (to let animation/fx time) } diff --git a/code/ryzom/tools/client/ryzom_installer/src/migratedialog.h b/code/ryzom/tools/client/ryzom_installer/src/migratedialog.h index 3c19bc6f4..9cd584372 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/migratedialog.h +++ b/code/ryzom/tools/client/ryzom_installer/src/migratedialog.h @@ -17,8 +17,6 @@ #ifndef MIGRATEDIALOG_H #define MIGRATEDIALOG_H -#if defined(Q_OS_WIN32) || defined(Q_MOC_RUN) - #include "ui_migratedialog.h" /** @@ -50,5 +48,3 @@ private: }; #endif - -#endif