diff --git a/CMakeLists.txt b/CMakeLists.txt index 93bec3590..84d6fd78a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,11 +46,11 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wstrict-overflow") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wstrict-aliasing") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") if (NOT WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-all") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wstack-protector") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") endif() if (UNIX AND NOT APPLE) diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index f52fb8f72..99ef7f2f8 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -119,6 +119,10 @@ if(APPLE) search_dependency(IOKIT FRAMEWORK IOKit OPTIONAL) endif() +if(WIN32) + set(ALL_LIBRARIES ${ALL_LIBRARIES} strmiids) +endif() + if (NOT GIT_DESCRIBE) execute_process( COMMAND git describe --tags