diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-06-18 18:09:58 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-06-18 18:48:42 +0200 |
commit | 646530b5f9ca5debe7a9b4840192e32e43f919bf (patch) | |
tree | 6a30523779bd5745d769c8c21722c6b876dd6c0f /cmake | |
parent | 44ee54d5a2e8edc6b4aaf47a9c3f8d10c9a69052 (diff) |
cmake: random nonsense
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/mingw-w64.cmake | 4 | ||||
-rw-r--r-- | cmake/opentrack-boilerplate.cmake | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/cmake/mingw-w64.cmake b/cmake/mingw-w64.cmake index b1d6ff2a..83501cdc 100644 --- a/cmake/mingw-w64.cmake +++ b/cmake/mingw-w64.cmake @@ -68,7 +68,7 @@ set(_CXXFLAGS_RELEASE "${_CFLAGS_RELEASE} -std=c++14 ${cc}") set(_CXXFLAGS_DEBUG "${_CFLAGS_DEBUG}") set(_LDFLAGS "-Wl,--dynamicbase,--no-seh,--nxcompat,--as-needed,--pic-executable") -set(_LDFLAGS_RELEASE "-Wl,--gc-sections,--exclude-libs,ALL -ffunction-sections") +set(_LDFLAGS_RELEASE "-Wl,--gc-sections,--exclude-libs,ALL -ffunction-sections -fdata-sections") set(_LDFLAGS_DEBUG "") set(enable-val FALSE) @@ -118,4 +118,4 @@ endforeach() if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "" FORCE) -endif()
\ No newline at end of file +endif() diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index 24771e44..022bfdd7 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -49,6 +49,7 @@ function(otr_qt n) qt5_wrap_cpp(${n}-moc ${${n}-hh} OPTIONS --no-notes) qt5_wrap_ui(${n}-uih ${${n}-ui}) qt5_add_resources(${n}-rcc ${${n}-rc}) + foreach(i moc uih rcc) set(${n}-${i} "${${n}-${i}}" PARENT_SCOPE) list(APPEND ${n}-all ${${n}-${i}}) @@ -163,6 +164,8 @@ function(otr_module n_) add_library(${n} ${link-mode} "${${n}-all}") endif() + set_property(SOURCE ${${n}-moc} ${${n}-uih} ${${n}-rcc} PROPERTY GENERATED TRUE) + if(NOT arg_RELINK) set_property(TARGET ${n} PROPERTY LINK_DEPENDS_NO_SHARED TRUE) else() |