r23122 by craig - Some CMake changes for link issue
scribus-commit
scribus-commit at lists.scribus.net
Fri Aug 9 21:54:11 UTC 2019
Author: craig
Date: Fri Aug 9 21:54:11 2019
New Revision: 23122
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23122
Log:
Some CMake changes for link issue
Modified:
trunk/Scribus/CMakeLists.txt
Modified: trunk/Scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23122&path=/trunk/Scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/CMakeLists.txt (original)
+++ trunk/Scribus/CMakeLists.txt Fri Aug 9 21:54:11 2019
@@ -8,6 +8,7 @@
#Require 3.12 for new Find Python modules
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
+message(STATUS "CMake Version: ${CMAKE_VERSION}")
# Configure CCache if available and wanted
if (WANT_CCACHE)
@@ -511,13 +512,13 @@
#None, Debug, Release, .. or custom ones
# set(WANT_DEBUG ON)
if(WANT_DEBUG)
- set(CMAKE_BUILD_TYPE Debug)
+ set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Set Debug Build Type" FORCE)
endif()
if (WANT_RELEASEWITHDEBUG)
- set(CMAKE_BUILD_TYPE RelWithDebInfo)
+ set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Set Release with Debug Info Build Type" FORCE)
endif()
if(NOT WANT_DEBUG AND NOT WANT_RELEASEWITHDEBUG)
- set(CMAKE_BUILD_TYPE RELEASE)
+ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Set Release Build Type" FORCE)
endif()
@@ -650,15 +651,15 @@
set(ENV{LD_PREBIND} 1 )
set(ENV{LD_PREBIND_ALLOW_OVERLAP} 1 )
if (WANT_DEBUG)
- set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
+ set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
set(CMAKE_C_FLAGS_DEBUG "-O0 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
endif()
if (WANT_RELEASEWITHDEBUG)
- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
endif()
if (NOT WANT_DEBUG AND NOT WANT_RELEASEWITHDEBUG)
- set(CMAKE_CXX_FLAGS_RELEASE "-O2 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
+ set(CMAKE_CXX_FLAGS_RELEASE "-O2 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
set(CMAKE_C_FLAGS_RELEASE "-O2 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
endif()
else()
@@ -669,8 +670,8 @@
set(CMAKE_C_FLAGS_DEBUG)
else()
# vanilla gcc
- set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall -fstrict-aliasing")
- set(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wall -fstrict-aliasing")
+ set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall -fstrict-aliasing -Wl,-E")
+ set(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wall -fstrict-aliasing -Wl,-E")
if (_machine_x86 OR _machine_x86_64)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fPIC")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fPIC")
@@ -682,8 +683,8 @@
set(CMAKE_CXX_FLAGS_RELEASE)
set(CMAKE_C_FLAGS_RELEASE)
else()
- set(CMAKE_CXX_FLAGS_RELEASE "-O2 -Wall -fPIC")
- set(CMAKE_C_FLAGS_RELEASE "-O2 -Wall -fPIC")
+ set(CMAKE_CXX_FLAGS_RELEASE "-O2 -Wall -fPIC -Wl,-E")
+ set(CMAKE_C_FLAGS_RELEASE "-O2 -Wall -fPIC -Wl,-E")
# add_definitions(-DNDEBUG)
endif()
@@ -702,7 +703,7 @@
########## Find Dependencies ##########
#<< Qt
-set (QT_MIN_VERSION "5.7.0")
+set(QT_MIN_VERSION "5.7.0")
set(CMAKE_PREFIX_PATH "${QT_PREFIX}/lib/cmake")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(Qt5Core ${QT_MIN_VERSION} REQUIRED)
More information about the scribus-commit
mailing list