diff CMakeLists.txt @ 4:9849250f50f2

Start implementation of certificatelist parser
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 11 Feb 2014 16:46:02 +0000
parents 524cd4908656
children 992c0ec57660
line wrap: on
line diff
--- a/CMakeLists.txt	Mon Feb 10 16:25:39 2014 +0000
+++ b/CMakeLists.txt	Tue Feb 11 16:46:02 2014 +0000
@@ -15,6 +15,7 @@
 set(M13UI_SOURCES
     ui/main.cpp
     ui/mainwindow.cpp
+    ui/listutil.c
 )
 
 set(M13UI_RESOURCES
@@ -28,9 +29,7 @@
 set(HARDENING_FLAGS " -Werror -fstack-protector-all")
 set(HARDENING_FLAGS " ${HARDENING_FLAGS} -Wstack-protector")
 set(HARDENING_FLAGS " ${HARDENING_FLAGS} --param ssp-buffer-size=4")
-set(HARDENING_FLAGS " ${HARDENING_FLAGS} -pie -fPIE -ftrapv")
 set(HARDENING_FLAGS " ${HARDENING_FLAGS} -D_FORTIFY_SOURCE=2 -O2")
-set(HARDENING_FLAGS " ${HARDENING_FLAGS} -Wl,-z,relro,-z,now")
 
 if(UNIX)
    # See: https://bugreports.qt-project.org/browse/QTBUG-35918
@@ -48,6 +47,9 @@
 
    set(EXTRA_STATIC_LIBS -lz -lpthread -ldl -lpng -ljpeg
       Qt5::QXcbIntegrationPlugin ${XCB_EXTRA_LIBS})
+
+   set(HARDENING_FLAGS " ${HARDENING_FLAGS} -pie -fPIE -ftrapv")
+   set(HARDENING_FLAGS " ${HARDENING_FLAGS} -Wl,-z,relro,-z,now")
 elseif(WIN32)
    get_target_property(_loc Qt5::Widgets LOCATION)
    get_filename_component(_qtpath ${_loc} PATH)
@@ -59,13 +61,14 @@
         -ladvapi32 -lshell32 -luser32 -lkernel32 -lz -lsicuin -lsicuuc -lsicudt -lpcre16)
    set(EXTRA_STATIC_LIBS Qt5::QWindowsIntegrationPlugin ${WINDOWS_EXTRA_LIBS})
 
-   set(HARDENING_FLAGS " ${HARDENING_FLAGS} -Wl,dynamicbase -Wl,nxcompat")
+   set(HARDENING_FLAGS " ${HARDENING_FLAGS} -Wl,--dynamicbase -Wl,--nxcompat")
 endif()
 
 qt5_add_resources(M13UI_SOURCES ${M13UI_RESOURCES})
 
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${HARDENING_FLAGS}")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_WARN_FLAGS} ${HARDENING_FLAGS}")
 
 add_executable(m13ui ${M13UI_SOURCES})
 

http://wald.intevation.org/projects/trustbridge/