From b95bbbd70b6b834a5501436c3d9979c03db5c760 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 17 Jun 2016 10:13:46 -0400 Subject: [PATCH] Round 4 --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 64339a0d..35a5ab9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,10 +147,8 @@ target_compile_options(${_LIBUINAME} if(BUILD_SHARED_LIBS) target_link_libraries(${_LIBUINAME} PRIVATE ${_LIBUI_LIBS}) -else() - target_link_libraries(libui - INTERFACE ${_LIBUI_LIBS}) endif() +# TODO INTERFACE libs don't inherit to grandhcildren? # on Windows the linker for static libraries is different; don't give it the flags if(BUILD_SHARED_LIBS) _target_link_options_private(${_LIBUINAME} @@ -202,6 +200,11 @@ macro(_add_exec _name) set_property(TARGET ${_name} PROPERTY POSITION_INDEPENDENT_CODE True) endif() + # TODO see above about INTERFACE + if(NOT BUILD_SHARED_LIBS) + target_link_libraries(${_name} + PRIVATE ${_LIBUI_LIBS}) + endif() # TODOfor some reason these don't propagate if(NOT WIN32)