mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 07:58:44 +00:00
Fixed: Warnings compiling with Qt 5
This commit is contained in:
parent
f44f646d6a
commit
007e47120a
1 changed files with 5 additions and 6 deletions
|
@ -40,14 +40,14 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
|||
|
||||
GET_TARGET_PROPERTY(_targetType ${_target} TYPE)
|
||||
|
||||
SET(_USE_PIE OFF)
|
||||
SET(_USE_PIC OFF)
|
||||
|
||||
IF(${_targetType} STREQUAL "SHARED_LIBRARY" OR ${_targetType} STREQUAL "MODULE_LIBRARY")
|
||||
LIST(APPEND _FLAGS " ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
|
||||
ELSE()
|
||||
GET_TARGET_PROPERTY(_pic ${_target} POSITION_INDEPENDENT_CODE)
|
||||
IF(_pic)
|
||||
SET(_USE_PIE ON)
|
||||
SET(_USE_PIC ON)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
@ -152,13 +152,12 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
|||
LIST(APPEND GLOBAL_DEFINITIONS " -DQT_NO_DEBUG")
|
||||
ENDIF()
|
||||
|
||||
# Qt5_POSITION_INDEPENDENT_CODE should be true if Qt was compiled with PIE
|
||||
# Qt5_POSITION_INDEPENDENT_CODE should be true if Qt was compiled with PIC
|
||||
IF(Qt5_POSITION_INDEPENDENT_CODE)
|
||||
SET(_USE_PIE ON)
|
||||
SET(_USE_PIC ON)
|
||||
ENDIF()
|
||||
|
||||
IF(_USE_PIE)
|
||||
LIST(APPEND _FLAGS " ${CMAKE_CXX_COMPILE_OPTIONS_PIE}")
|
||||
IF(_USE_PIC)
|
||||
LIST(APPEND _FLAGS " ${CMAKE_CXX_COMPILE_OPTIONS_PIC}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
|
Loading…
Reference in a new issue