From 9918192f0943a61e9970bad9f1a02ffbe3af8591 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 3 Apr 2018 12:28:52 +0200 Subject: cmake: cleanup - OTR_MODULE_NAME now unused - _USE_MATH_DEFINES only needed for MSVC - old cruft in i18n support --- cmake/opentrack-boilerplate.cmake | 1 - cmake/opentrack-platform.cmake | 3 ++- cmake/opentrack-qt.cmake | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'cmake') diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index e4391257..fff1a6c3 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -175,7 +175,6 @@ function(otr_module n_) target_link_libraries(${n} opentrack-api opentrack-options opentrack-compat) endif() - target_compile_definitions("${n}" PRIVATE "-DOTR_MODULE_NAME=\"${n_}\"") string(REPLACE "-" "_" build-n ${n_}) string(TOUPPER "${build-n}" build-n) set_property(TARGET ${n} PROPERTY DEFINE_SYMBOL "BUILD_${build-n}") diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake index 3276b832..810544f4 100644 --- a/cmake/opentrack-platform.cmake +++ b/cmake/opentrack-platform.cmake @@ -60,6 +60,8 @@ if(MSVC) add_definitions(-D_ITERATOR_DEBUG_LEVEL=0) add_definitions(-D_HAS_EXCEPTIONS=0) add_definitions(-D_SILENCE_CXX17_NEGATORS_DEPRECATION_WARNING -D_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING) + + add_definitions(-D_USE_MATH_DEFINES=1) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Zi") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Zi") @@ -94,7 +96,6 @@ if(WIN32) set(CMAKE_RC_COMPILE_OBJECT " --use-temp-file -O coff -i -o ") endif() enable_language(RC) - add_definitions(-D_USE_MATH_DEFINES=1) endif(WIN32) if(opentrack-install-rpath) diff --git a/cmake/opentrack-qt.cmake b/cmake/opentrack-qt.cmake index 3c9bb9a4..a5f2b0f2 100644 --- a/cmake/opentrack-qt.cmake +++ b/cmake/opentrack-qt.cmake @@ -60,4 +60,5 @@ function(otr_qt n) set(${n}-all "${${n}-all}" PARENT_SCOPE) include_directories(SYSTEM ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS}) add_definitions(${Qt5Core_DEFINITIONS} ${Qt5Gui_DEFINITIONS} ${Qt5Widgets_DEFINITIONS} ${Qt5Network_DEFINITIONS}) + add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT) endfunction() -- cgit v1.2.3