CMake: Fix wx-config library list with monolithic build

Closes https://github.com/wxWidgets/wxWidgets/pull/1132
This commit is contained in:
Maarten Bent
2018-12-28 19:26:39 +01:00
committed by Vadim Zeitlin
parent fc65bd92a6
commit 8555f4abb0
3 changed files with 14 additions and 1 deletions

View File

@@ -286,6 +286,9 @@ function(wx_set_target_properties target_name is_base)
wx_set_common_target_properties(${target_name})
endfunction()
# List of libraries added via wx_add_library() to use for wx-config
set(wxLIB_TARGETS)
# Add a wxWidgets library
# wx_add_library(<target_name> [IS_BASE] <src_files>...)
# first parameter is the name of the library
@@ -295,6 +298,9 @@ macro(wx_add_library name)
cmake_parse_arguments(wxADD_LIBRARY "IS_BASE" "" "" ${ARGN})
set(src_files ${wxADD_LIBRARY_UNPARSED_ARGUMENTS})
list(APPEND wxLIB_TARGETS ${name})
set(wxLIB_TARGETS ${wxLIB_TARGETS} PARENT_SCOPE)
if(wxBUILD_MONOLITHIC AND NOT ${name} STREQUAL "mono")
# collect all source files for mono library
set(wxMONO_SRC_FILES ${wxMONO_SRC_FILES} ${src_files} PARENT_SCOPE)