diff options
Diffstat (limited to 'cmake/opentrack-boilerplate.cmake')
-rw-r--r-- | cmake/opentrack-boilerplate.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index 35ef1d22..821de1ba 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -128,11 +128,12 @@ endfunction() function(otr_module n_) message(STATUS "module ${n_}") cmake_parse_arguments(arg - "STATIC;NO-COMPAT;BIN;EXECUTABLE;NO-QT;WIN32-CONSOLE;NO-INSTALL" + "STATIC;NO-COMPAT;BIN;EXECUTABLE;NO-QT;WIN32-CONSOLE;NO-INSTALL;RELINK" "LINK;COMPILE" "SOURCES" ${ARGN} ) + if(NOT "${arg_UNPARSED_ARGUMENTS}" STREQUAL "") message(FATAL_ERROR "otr_module bad formals: ${arg_UNPARSED_ARGUMENTS}") endif() @@ -166,6 +167,12 @@ function(otr_module n_) add_library(${n} ${link-mode} "${${n}-all}") endif() + if(NOT arg_RELINK) + set_property(TARGET ${n} PROPERTY LINK_DEPENDS_NO_SHARED TRUE) + else() + set_property(TARGET ${n} PROPERTY LINK_DEPENDS_NO_SHARED FALSE) + endif() + if(NOT arg_NO-QT) target_link_libraries(${n} ${MY_QT_LIBS}) endif() |