mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 10:22:55 +00:00
define Q_NO_DATA_RELOCATION based on dummy target property
CMAKE_POSITION_INDEPENDENT_CODE may not be set but targets may have the POSITION_INDEPENDENT_CODE property set to TRUE anyway Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
716ee27810
commit
2f1cdbb769
7 changed files with 9 additions and 14 deletions
|
@ -488,6 +488,12 @@ if(NOT WITH_ACCESSIBILITY)
|
||||||
katie_definition(-DQT_NO_ACCESSIBILITY)
|
katie_definition(-DQT_NO_ACCESSIBILITY)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
add_library(pic_test ${KATIE_TYPE} EXCLUDE_FROM_ALL "${CMAKE_SOURCE_DIR}/cmake/pic.cpp")
|
||||||
|
get_target_property(HAVE_pic pic_test POSITION_INDEPENDENT_CODE)
|
||||||
|
if(NOT HAVE_pic)
|
||||||
|
katie_definition(-DQ_NO_DATA_RELOCATION)
|
||||||
|
endif()
|
||||||
|
|
||||||
# keep in sync with the gui component CMake file, only definitions setup is needed here
|
# keep in sync with the gui component CMake file, only definitions setup is needed here
|
||||||
foreach(x11ext Xshape Xinerama Xrandr Xrender Xfixes Xcursor)
|
foreach(x11ext Xshape Xinerama Xrandr Xrender Xfixes Xcursor)
|
||||||
if(NOT X11_${x11ext}_FOUND)
|
if(NOT X11_${x11ext}_FOUND)
|
||||||
|
|
3
cmake/pic.cpp
Normal file
3
cmake/pic.cpp
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
struct PIC {
|
||||||
|
bool abc;
|
||||||
|
};
|
|
@ -1 +0,0 @@
|
||||||
int main() { return 0; }
|
|
|
@ -44,16 +44,6 @@ if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
katie_definition(-DQT_NO_DEBUG)
|
katie_definition(-DQT_NO_DEBUG)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
try_compile(bsymbolic_functions_test
|
|
||||||
${CMAKE_BINARY_DIR}
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/bsymbolic_functions.cpp
|
|
||||||
CMAKE_FLAGS -shared -Wl,-Bsymbolic-functions -fPIC
|
|
||||||
OUTPUT_VARIABLE bsymbolic_functions_test_output
|
|
||||||
)
|
|
||||||
if(NOT bsymbolic_functions_test OR NOT CMAKE_POSITION_INDEPENDENT_CODE)
|
|
||||||
katie_definition(-DQ_NO_DATA_RELOCATION)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Set compiler standard to C++ 11, appending to CMAKE_CXX_FLAGS is done so that try_compile() is
|
# Set compiler standard to C++ 11, appending to CMAKE_CXX_FLAGS is done so that try_compile() is
|
||||||
# also affected, which KDE uses for visibility check for an example
|
# also affected, which KDE uses for visibility check for an example
|
||||||
if(NOT CMAKE_VERSION VERSION_LESS "3.8.0")
|
if(NOT CMAKE_VERSION VERSION_LESS "3.8.0")
|
||||||
|
|
|
@ -1463,7 +1463,6 @@ lib/cmake/Katie/KatieConfigVersion.cmake
|
||||||
lib/cmake/Katie/KatieTargets-%%CMAKE_BUILD_TYPE%%.cmake
|
lib/cmake/Katie/KatieTargets-%%CMAKE_BUILD_TYPE%%.cmake
|
||||||
lib/cmake/Katie/KatieTargets.cmake
|
lib/cmake/Katie/KatieTargets.cmake
|
||||||
lib/cmake/Katie/Qt4UseFile.cmake
|
lib/cmake/Katie/Qt4UseFile.cmake
|
||||||
lib/cmake/Katie/mkspecs/bsymbolic_functions.cpp
|
|
||||||
lib/cmake/Katie/mkspecs/mkspecs.cmake
|
lib/cmake/Katie/mkspecs/mkspecs.cmake
|
||||||
lib/katie/imports/Qt/labs/folderlistmodel/libqmlfolderlistmodelplugin.so
|
lib/katie/imports/Qt/labs/folderlistmodel/libqmlfolderlistmodelplugin.so
|
||||||
lib/katie/imports/Qt/labs/folderlistmodel/qmldir
|
lib/katie/imports/Qt/labs/folderlistmodel/qmldir
|
||||||
|
|
|
@ -1466,7 +1466,6 @@ lib/cmake/Katie/KatieConfigVersion.cmake
|
||||||
lib/cmake/Katie/KatieTargets-relwithdebinfo.cmake
|
lib/cmake/Katie/KatieTargets-relwithdebinfo.cmake
|
||||||
lib/cmake/Katie/KatieTargets.cmake
|
lib/cmake/Katie/KatieTargets.cmake
|
||||||
lib/cmake/Katie/Qt4UseFile.cmake
|
lib/cmake/Katie/Qt4UseFile.cmake
|
||||||
lib/cmake/Katie/mkspecs/bsymbolic_functions.cpp
|
|
||||||
lib/cmake/Katie/mkspecs/mkspecs.cmake
|
lib/cmake/Katie/mkspecs/mkspecs.cmake
|
||||||
lib/katie/imports/Qt/labs/folderlistmodel/libqmlfolderlistmodelplugin.so
|
lib/katie/imports/Qt/labs/folderlistmodel/libqmlfolderlistmodelplugin.so
|
||||||
lib/katie/imports/Qt/labs/folderlistmodel/qmldir
|
lib/katie/imports/Qt/labs/folderlistmodel/qmldir
|
||||||
|
|
|
@ -1481,7 +1481,6 @@ lib/cmake/Katie/KatieTargets${MODCMAKE_BUILD_SUFFIX}
|
||||||
lib/cmake/Katie/KatieTargets.cmake
|
lib/cmake/Katie/KatieTargets.cmake
|
||||||
lib/cmake/Katie/Qt4UseFile.cmake
|
lib/cmake/Katie/Qt4UseFile.cmake
|
||||||
lib/cmake/Katie/mkspecs/
|
lib/cmake/Katie/mkspecs/
|
||||||
lib/cmake/Katie/mkspecs/bsymbolic_functions.cpp
|
|
||||||
lib/cmake/Katie/mkspecs/mkspecs.cmake
|
lib/cmake/Katie/mkspecs/mkspecs.cmake
|
||||||
lib/katie/
|
lib/katie/
|
||||||
lib/katie/imports/
|
lib/katie/imports/
|
||||||
|
|
Loading…
Add table
Reference in a new issue