This commit is contained in:
Pietro Gagliardi 2016-06-17 10:13:46 -04:00
parent f17483ccd2
commit b95bbbd70b
1 changed files with 6 additions and 3 deletions

View File

@ -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)