Enable DEP & ASLR on Windows

This commit is contained in:
rockihack 2017-09-04 13:42:20 +02:00 committed by Roeland Jago Douma
parent 43f85a787b
commit 4e90179065
No known key found for this signature in database
GPG key ID: F941078878347C0C

View file

@ -8,6 +8,12 @@ if(NOT TOKEN_AUTH_ONLY)
find_package(Qt5Keychain REQUIRED)
endif()
if(WIN32)
# Enable DEP & ASLR
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--nxcompat -Wl,--dynamicbase")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--nxcompat -Wl,--dynamicbase")
endif()
add_subdirectory(csync)
add_subdirectory(libsync)
if (NOT BUILD_LIBRARIES_ONLY)