Merge with develop

--HG--
branch : compatibility-develop
hg/compatibility-develop
kervala 8 years ago
commit d5d4ba1e0c

@ -33,17 +33,29 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
SET(PCH_ARCHS) SET(PCH_ARCHS)
SET(_FLAGS) 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) 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) GET_TARGET_PROPERTY(_targetType ${_target} TYPE)
SET(_USE_PIC OFF) SET(_USE_PIC OFF)
IF(${_targetType} STREQUAL "SHARED_LIBRARY" OR ${_targetType} STREQUAL "MODULE_LIBRARY") 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() ELSE()
GET_TARGET_PROPERTY(_pic ${_target} POSITION_INDEPENDENT_CODE) GET_TARGET_PROPERTY(_pic ${_target} POSITION_INDEPENDENT_CODE)
IF(_pic) IF(_pic)
@ -53,7 +65,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES) GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES)
FOREACH(item ${DIRINC}) FOREACH(item ${DIRINC})
LIST(APPEND _FLAGS " -I\"${item}\"") LIST(APPEND _FLAGS -I"${item}")
ENDFOREACH() ENDFOREACH()
# NOTE: As cmake files (eg FindQT4) may now use generator expressions around their defines that evaluate # 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) GET_TARGET_PROPERTY(oldProps ${_target} COMPILE_FLAGS)
IF(oldProps) IF(oldProps)
LIST(APPEND _FLAGS " ${oldProps}") LIST(APPEND _FLAGS ${oldProps})
ENDIF() ENDIF()
GET_TARGET_PROPERTY(oldPropsBuild ${_target} COMPILE_FLAGS_${_UPPER_BUILD}) GET_TARGET_PROPERTY(oldPropsBuild ${_target} COMPILE_FLAGS_${_UPPER_BUILD})
IF(oldPropsBuild) IF(oldPropsBuild)
LIST(APPEND _FLAGS " ${oldPropsBuild}") LIST(APPEND _FLAGS ${oldPropsBuild})
ENDIF() ENDIF()
GET_TARGET_PROPERTY(DIRINC ${_target} INCLUDE_DIRECTORIES) GET_TARGET_PROPERTY(DIRINC ${_target} INCLUDE_DIRECTORIES)
IF(DIRINC) IF(DIRINC)
FOREACH(item ${DIRINC}) FOREACH(item ${DIRINC})
LIST(APPEND _FLAGS " -I\"${item}\"") LIST(APPEND _FLAGS -I"${item}")
ENDFOREACH() ENDFOREACH()
ENDIF() ENDIF()
@ -130,7 +142,7 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
IF(_DIRS) IF(_DIRS)
FOREACH(item ${_DIRS}) FOREACH(item ${_DIRS})
LIST(APPEND GLOBAL_DEFINITIONS " -I\"${item}\"") LIST(APPEND GLOBAL_DEFINITIONS -I"${item}")
ENDFOREACH() ENDFOREACH()
ENDIF() ENDIF()
@ -159,24 +171,21 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
ENDIF() ENDIF()
IF(_USE_PIC) IF(_USE_PIC)
LIST(APPEND _FLAGS " ${CMAKE_CXX_COMPILE_OPTIONS_PIC}") LIST(APPEND _FLAGS ${CMAKE_CXX_COMPILE_OPTIONS_PIC})
ENDIF() ENDIF()
ENDIF() ENDIF()
IF(CMAKE_VERSION VERSION_LESS "3.3.0") IF(CMAKE_VERSION VERSION_LESS "3.3.0")
GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS) GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
GET_DIRECTORY_PROPERTY(_directory_definitions DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS) GET_DIRECTORY_PROPERTY(_directory_definitions DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS)
LIST(APPEND _FLAGS " ${_directory_flags}") LIST(APPEND _FLAGS ${_directory_flags})
LIST(APPEND _FLAGS " ${_directory_definitions}") LIST(APPEND _FLAGS ${_directory_definitions})
ENDIF() ENDIF()
# Format definitions # Format definitions
IF(MSVC) IF(MSVC)
# Fix path with space # Fix path with space
SEPARATE_ARGUMENTS(_FLAGS UNIX_COMMAND "${_FLAGS}") SEPARATE_ARGUMENTS(_FLAGS UNIX_COMMAND "${_FLAGS}")
ELSE()
STRING(REGEX REPLACE " +" " " _FLAGS ${_FLAGS})
SEPARATE_ARGUMENTS(_FLAGS)
ENDIF() ENDIF()
# Already in list form and items may contain non-leading spaces that should not be split on # 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() ENDIF()
IF(PCH_FLAGS) IF(PCH_FLAGS)
LIST(REMOVE_ITEM PCH_FLAGS "")
LIST(REMOVE_DUPLICATES PCH_FLAGS) LIST(REMOVE_DUPLICATES PCH_FLAGS)
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()

@ -68,11 +68,30 @@ MACRO(NL_DEFAULT_PROPS name label)
ENDIF(${type} STREQUAL SHARED_LIBRARY) ENDIF(${type} STREQUAL SHARED_LIBRARY)
IF(${type} STREQUAL EXECUTABLE AND WIN32 AND NOT MINGW) 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 SET_TARGET_PROPERTIES(${name} PROPERTIES
VERSION ${NL_VERSION} VERSION ${NL_VERSION}
SOVERSION ${NL_VERSION_MAJOR} SOVERSION ${NL_VERSION_MAJOR}
COMPILE_FLAGS "/GA" 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) ENDIF(${type} STREQUAL EXECUTABLE AND WIN32 AND NOT MINGW)
ENDMACRO(NL_DEFAULT_PROPS) ENDMACRO(NL_DEFAULT_PROPS)

@ -17,8 +17,6 @@
#ifndef MIGRATEDIALOG_H #ifndef MIGRATEDIALOG_H
#define MIGRATEDIALOG_H #define MIGRATEDIALOG_H
#if defined(Q_OS_WIN32) || defined(Q_MOC_RUN)
#include "ui_migratedialog.h" #include "ui_migratedialog.h"
/** /**
@ -50,5 +48,3 @@ private:
}; };
#endif #endif
#endif

Loading…
Cancel
Save