summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-platform.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-05-03 13:19:30 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-05-03 13:19:30 +0200
commitcbd3bf906852f831cb5b8abfde55ad324b25fbeb (patch)
tree88c72d86143bbb8e65c86562b91364631753afb9 /cmake/opentrack-platform.cmake
parentb292aaf2b9d49847e014a3fdda3df287229ca0a0 (diff)
cmake: conditionalize .pdb install on MSVC
I haven't written the binutils equivalent yet. The official builds will come with debug info but it defaults to disabled. cf. https://github.com/opentrack/opentrack/issues/605#issuecomment-298856218
Diffstat (limited to 'cmake/opentrack-platform.cmake')
-rw-r--r--cmake/opentrack-platform.cmake12
1 files changed, 9 insertions, 3 deletions
diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake
index 24cbd6de..5bb7581a 100644
--- a/cmake/opentrack-platform.cmake
+++ b/cmake/opentrack-platform.cmake
@@ -43,12 +43,18 @@ endif()
if(MSVC)
add_definitions(-DNOMINMAX -D_CRT_SECURE_NO_WARNINGS)
add_definitions(-D_ITERATOR_DEBUG_LEVEL=0 -D_HAS_ITERATOR_DEBUGGING=0 -D_SECURE_SCL=0)
- set(CMAKE_CXX_FLAGS "-std:c++14 ${CMAKE_CXX_FLAGS} /Zi")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Zi")
+ set(CMAKE_CXX_FLAGS "-std:c++14 ${CMAKE_CXX_FLAGS}")
+ if(SDK_INSTALL_DEBUG_INFO)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Zi")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Zi")
+ endif()
#set(CMAKE_C_FLAGS " -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS ${CMAKE_C_FLAGS}")
foreach (i SHARED MODULE EXE)
- set(CMAKE_${i}_LINKER_FLAGS "${CMAKE_${i}_LINKER_FLAGS} -DYNAMICBASE -NXCOMPAT -DEBUG")
+ set(CMAKE_${i}_LINKER_FLAGS "${CMAKE_${i}_LINKER_FLAGS} -DYNAMICBASE -NXCOMPAT")
+ if(SDK_INSTALL_DEBUG_INFO)
+ set(CMAKE_${i}_LINKER_FLAGS "${CMAKE_${i}_LINKER_FLAGS} -DEBUG")
+ endif()
endforeach()
endif()