CMake: use wx prefix in library names

Rename all library targets to start with wx. This way it does not use generic
names like base or core that could interfere with other libraries that add
include the wxWidgets project.
This commit is contained in:
Maarten Bent
2020-05-17 19:41:44 +02:00
parent 0c2d05f52f
commit 0f806ad96d
26 changed files with 198 additions and 184 deletions

View File

@@ -29,8 +29,8 @@ endmacro()
macro(wx_get_dependencies var lib) macro(wx_get_dependencies var lib)
set(${var}) set(${var})
if(TARGET ${lib}) if(TARGET wx${lib})
get_target_property(deps ${lib} LINK_LIBRARIES) get_target_property(deps wx${lib} LINK_LIBRARIES)
foreach(dep IN LISTS deps) foreach(dep IN LISTS deps)
if(TARGET ${dep}) if(TARGET ${dep})
get_target_property(dep_name ${dep} OUTPUT_NAME) get_target_property(dep_name ${dep} OUTPUT_NAME)
@@ -98,7 +98,7 @@ function(wx_write_config)
set(STD_BASE_LIBS_ALL xml net base) set(STD_BASE_LIBS_ALL xml net base)
set(STD_GUI_LIBS_ALL xrc html qa adv core) set(STD_GUI_LIBS_ALL xrc html qa adv core)
foreach(lib IN ITEMS xrc webview stc richtext ribbon propgrid aui gl media html qa adv core xml net base) foreach(lib IN ITEMS xrc webview stc richtext ribbon propgrid aui gl media html qa adv core xml net base)
list(FIND wxLIB_TARGETS ${lib} hasLib) list(FIND wxLIB_TARGETS wx${lib} hasLib)
if (hasLib GREATER -1) if (hasLib GREATER -1)
wx_string_append(BUILT_WX_LIBS "${lib} ") wx_string_append(BUILT_WX_LIBS "${lib} ")
list(FIND STD_BASE_LIBS_ALL ${lib} index) list(FIND STD_BASE_LIBS_ALL ${lib} index)

View File

@@ -56,7 +56,7 @@ function(wx_add_demo name)
if(wxBUILD_SHARED) if(wxBUILD_SHARED)
target_compile_definitions(${DEMO_NAME} PRIVATE WXUSINGDLL) target_compile_definitions(${DEMO_NAME} PRIVATE WXUSINGDLL)
endif() endif()
wx_exe_link_libraries(${DEMO_NAME} core ${DEMO_LIBRARIES}) wx_exe_link_libraries(${DEMO_NAME} wxcore ${DEMO_LIBRARIES})
wx_set_common_target_properties(${DEMO_NAME}) wx_set_common_target_properties(${DEMO_NAME})
set_target_properties(${DEMO_NAME} PROPERTIES FOLDER "Demos") set_target_properties(${DEMO_NAME} PROPERTIES FOLDER "Demos")
set_target_properties(${DEMO_NAME} PROPERTIES set_target_properties(${DEMO_NAME} PROPERTIES
@@ -92,7 +92,7 @@ wx_add_demo(forty
DATA DATA
about.htm about.htm
LIBRARIES LIBRARIES
html xml wxhtml wxxml
) )
wx_add_demo(fractal wx_add_demo(fractal
@@ -118,7 +118,7 @@ wx_add_demo(poem
DATA DATA
wxpoem.txt wxpoem.dat wxpoem.idx wxpoem.txt wxpoem.dat wxpoem.idx
LIBRARIES LIBRARIES
html wxhtml
NAME NAME
wxpoem wxpoem
) )

View File

@@ -120,6 +120,12 @@ endfunction()
# Set common properties on wx library target # Set common properties on wx library target
function(wx_set_target_properties target_name is_base) function(wx_set_target_properties target_name is_base)
if(${target_name} MATCHES "wx.*")
string(SUBSTRING ${target_name} 2 -1 target_name_short)
else()
set(target_name_short ${target_name})
endif()
# Set library name according to: # Set library name according to:
# docs/contributing/about-platform-toolkit-and-library-names.md # docs/contributing/about-platform-toolkit-and-library-names.md
if(is_base) if(is_base)
@@ -137,9 +143,9 @@ function(wx_set_target_properties target_name is_base)
else() else()
set(lib_unicode) set(lib_unicode)
endif() endif()
if(NOT target_name STREQUAL "base" AND NOT target_name STREQUAL "mono") if(NOT target_name_short STREQUAL "base" AND NOT target_name_short STREQUAL "mono")
# Do not append library name for base library # Do not append library name for base library
set(lib_suffix _${target_name}) set(lib_suffix _${target_name_short})
else() else()
set(lib_suffix) set(lib_suffix)
endif() endif()
@@ -203,7 +209,7 @@ function(wx_set_target_properties target_name is_base)
# Set common compile definitions # Set common compile definitions
target_compile_definitions(${target_name} PRIVATE WXBUILDING _LIB) target_compile_definitions(${target_name} PRIVATE WXBUILDING _LIB)
if(target_name STREQUAL "mono" AND wxUSE_GUI) if(target_name_short STREQUAL "mono" AND wxUSE_GUI)
target_compile_definitions(${target_name} PRIVATE wxUSE_GUI=1 wxUSE_BASE=1) target_compile_definitions(${target_name} PRIVATE wxUSE_GUI=1 wxUSE_BASE=1)
elseif(is_base OR NOT wxUSE_GUI) elseif(is_base OR NOT wxUSE_GUI)
target_compile_definitions(${target_name} PRIVATE wxUSE_GUI=0 wxUSE_BASE=1) target_compile_definitions(${target_name} PRIVATE wxUSE_GUI=0 wxUSE_BASE=1)
@@ -274,26 +280,26 @@ function(wx_set_target_properties target_name is_base)
PUBLIC ${wxTOOLKIT_DEFINITIONS}) PUBLIC ${wxTOOLKIT_DEFINITIONS})
if(wxBUILD_SHARED) if(wxBUILD_SHARED)
string(TOUPPER ${target_name} target_name_upper) string(TOUPPER ${target_name_short} target_name_upper)
if(target_name STREQUAL "mono") if(target_name_short STREQUAL "mono")
target_compile_definitions(${target_name} PRIVATE DLL_EXPORTS WXMAKINGDLL) target_compile_definitions(${target_name} PRIVATE DLL_EXPORTS WXMAKINGDLL)
else() else()
target_compile_definitions(${target_name} PRIVATE DLL_EXPORTS WXMAKINGDLL_${target_name_upper}) target_compile_definitions(${target_name} PRIVATE DLL_EXPORTS WXMAKINGDLL_${target_name_upper})
endif() endif()
if(NOT target_name STREQUAL "base") if(NOT target_name_short STREQUAL "base")
target_compile_definitions(${target_name} PRIVATE WXUSINGDLL) target_compile_definitions(${target_name} PRIVATE WXUSINGDLL)
endif() endif()
endif() endif()
# Link common libraries # Link common libraries
if(NOT target_name STREQUAL "mono") if(NOT target_name_short STREQUAL "mono")
if(NOT target_name STREQUAL "base") if(NOT target_name_short STREQUAL "base")
# All libraries except base need the base library # All libraries except base need the base library
target_link_libraries(${target_name} PUBLIC base) target_link_libraries(${target_name} PUBLIC wxbase)
endif() endif()
if(NOT is_base AND NOT target_name STREQUAL "core") if(NOT is_base AND NOT target_name_short STREQUAL "core")
# All non base libraries except core need core # All non base libraries except core need core
target_link_libraries(${target_name} PUBLIC core) target_link_libraries(${target_name} PUBLIC wxcore)
endif() endif()
endif() endif()
@@ -317,7 +323,7 @@ macro(wx_add_library name)
list(APPEND wxLIB_TARGETS ${name}) list(APPEND wxLIB_TARGETS ${name})
set(wxLIB_TARGETS ${wxLIB_TARGETS} PARENT_SCOPE) set(wxLIB_TARGETS ${wxLIB_TARGETS} PARENT_SCOPE)
if(wxBUILD_MONOLITHIC AND NOT ${name} STREQUAL "mono") if(wxBUILD_MONOLITHIC AND NOT ${name} STREQUAL "wxmono")
# collect all source files for mono library # collect all source files for mono library
set(wxMONO_SRC_FILES ${wxMONO_SRC_FILES} ${src_files} PARENT_SCOPE) set(wxMONO_SRC_FILES ${wxMONO_SRC_FILES} ${src_files} PARENT_SCOPE)
else() else()
@@ -333,9 +339,16 @@ macro(wx_add_library name)
set(wxBUILD_LIB_TYPE STATIC) set(wxBUILD_LIB_TYPE STATIC)
endif() endif()
if(${name} MATCHES "wx.*")
string(SUBSTRING ${name} 2 -1 name_short)
else()
set(name_short ${name})
endif()
add_library(${name} ${wxBUILD_LIB_TYPE} ${src_files}) add_library(${name} ${wxBUILD_LIB_TYPE} ${src_files})
add_library(wx::${name} ALIAS ${name}) add_library(wx::${name_short} ALIAS ${name})
wx_set_target_properties(${name} ${wxADD_LIBRARY_IS_BASE}) wx_set_target_properties(${name} ${wxADD_LIBRARY_IS_BASE})
set_property(TARGET ${name} PROPERTY PROJECT_LABEL ${name_short})
# Setup install # Setup install
wx_install(TARGETS ${name} wx_install(TARGETS ${name}
@@ -406,7 +419,7 @@ endmacro()
# Link wx libraries to executable # Link wx libraries to executable
macro(wx_exe_link_libraries name) macro(wx_exe_link_libraries name)
if(wxBUILD_MONOLITHIC) if(wxBUILD_MONOLITHIC)
target_link_libraries(${name} PUBLIC mono) target_link_libraries(${name} PUBLIC wxmono)
else() else()
target_link_libraries(${name};PRIVATE;${ARGN}) target_link_libraries(${name};PRIVATE;${ARGN})
endif() endif()
@@ -512,6 +525,7 @@ function(wx_add_builtin_library name)
add_library(${name} STATIC ${src_list}) add_library(${name} STATIC ${src_list})
add_library(wx::${name_short} ALIAS ${name}) add_library(wx::${name_short} ALIAS ${name})
wx_set_builtin_target_properties(${name}) wx_set_builtin_target_properties(${name})
set_property(TARGET ${name} PROPERTY PROJECT_LABEL ${name_short})
if(wxBUILD_SHARED) if(wxBUILD_SHARED)
set_target_properties(${name} PROPERTIES POSITION_INDEPENDENT_CODE TRUE) set_target_properties(${name} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
endif() endif()
@@ -705,10 +719,10 @@ function(wx_add_sample name)
endif() endif()
# All samples use at least the base library other libraries # All samples use at least the base library other libraries
# will have to be added with wx_link_sample_libraries() # will have to be added with wx_link_sample_libraries()
wx_exe_link_libraries(${target_name} base) wx_exe_link_libraries(${target_name} wxbase)
if(NOT SAMPLE_CONSOLE) if(NOT SAMPLE_CONSOLE)
# UI samples always require core # UI samples always require core
wx_exe_link_libraries(${target_name} core) wx_exe_link_libraries(${target_name} wxcore)
else() else()
target_compile_definitions(${target_name} PRIVATE wxUSE_GUI=0 wxUSE_BASE=1) target_compile_definitions(${target_name} PRIVATE wxUSE_GUI=0 wxUSE_BASE=1)
endif() endif()
@@ -866,7 +880,7 @@ function(wx_add_test name)
endif() endif()
add_executable(${name} ${test_src}) add_executable(${name} ${test_src})
target_include_directories(${name} PRIVATE "${wxSOURCE_DIR}/tests" "${wxSOURCE_DIR}/3rdparty/catch/include") target_include_directories(${name} PRIVATE "${wxSOURCE_DIR}/tests" "${wxSOURCE_DIR}/3rdparty/catch/include")
wx_exe_link_libraries(${name} base) wx_exe_link_libraries(${name} wxbase)
if(wxBUILD_SHARED) if(wxBUILD_SHARED)
target_compile_definitions(${name} PRIVATE WXUSINGDLL) target_compile_definitions(${name} PRIVATE WXUSINGDLL)
endif() endif()

View File

@@ -75,31 +75,31 @@ endforeach()
if(wxBUILD_MONOLITHIC) if(wxBUILD_MONOLITHIC)
# Create monolithic library target # Create monolithic library target
list(LENGTH wxMONO_SRC_FILES src_file_count) list(LENGTH wxMONO_SRC_FILES src_file_count)
wx_add_library(mono ${wxMONO_SRC_FILES}) wx_add_library(wxmono ${wxMONO_SRC_FILES})
foreach(vis PRIVATE PUBLIC) foreach(vis PRIVATE PUBLIC)
if(wxMONO_LIBS_${vis}) if(wxMONO_LIBS_${vis})
# Remove libs included in mono from list # Remove libs included in mono from list
foreach(lib IN LISTS LIBS) foreach(lib IN LISTS LIBS)
list(REMOVE_ITEM wxMONO_LIBS_${vis} ${lib}) list(REMOVE_ITEM wxMONO_LIBS_${vis} wx${lib})
endforeach() endforeach()
target_link_libraries(mono ${vis} ${wxMONO_LIBS_${vis}}) target_link_libraries(wxmono ${vis} ${wxMONO_LIBS_${vis}})
endif() endif()
if(wxMONO_INCLUDE_DIRS_${vis}) if(wxMONO_INCLUDE_DIRS_${vis})
set(INCLUDE_POS) set(INCLUDE_POS)
if (vis STREQUAL PRIVATE) if (vis STREQUAL PRIVATE)
set(INCLUDE_POS BEFORE) set(INCLUDE_POS BEFORE)
endif() endif()
target_include_directories(mono ${INCLUDE_POS} ${vis} ${wxMONO_INCLUDE_DIRS_${vis}}) target_include_directories(wxmono ${INCLUDE_POS} ${vis} ${wxMONO_INCLUDE_DIRS_${vis}})
endif() endif()
if(wxMONO_DEFINITIONS_${vis}) if(wxMONO_DEFINITIONS_${vis})
target_compile_definitions(mono ${vis} ${wxMONO_DEFINITIONS_${vis}}) target_compile_definitions(wxmono ${vis} ${wxMONO_DEFINITIONS_${vis}})
endif() endif()
endforeach() endforeach()
foreach(file ${wxMONO_NONCOMPILED_CPP_FILES}) foreach(file ${wxMONO_NONCOMPILED_CPP_FILES})
set_source_files_properties(${file} PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties(${file} PROPERTIES HEADER_FILE_ONLY TRUE)
endforeach() endforeach()
wx_finalize_lib(mono) wx_finalize_lib(wxmono)
endif() endif()
# Propagate variable(s) to parent scope # Propagate variable(s) to parent scope

View File

@@ -9,6 +9,6 @@
include(../../source_groups.cmake) include(../../source_groups.cmake)
wx_add_library(adv "${wxSOURCE_DIR}/src/common/dummy.cpp") wx_add_library(wxadv "${wxSOURCE_DIR}/src/common/dummy.cpp")
wx_finalize_lib(adv) wx_finalize_lib(wxadv)

View File

@@ -17,6 +17,6 @@ elseif(WXGTK2)
wx_append_sources(AUI_FILES AUI_GTK) wx_append_sources(AUI_FILES AUI_GTK)
endif() endif()
wx_add_library(aui ${AUI_FILES}) wx_add_library(wxaui ${AUI_FILES})
wx_finalize_lib(aui) wx_finalize_lib(wxaui)

View File

@@ -26,38 +26,38 @@ elseif(UNIX)
wx_append_sources(BASE_FILES BASE_UNIX) wx_append_sources(BASE_FILES BASE_UNIX)
endif() endif()
wx_add_library(base IS_BASE ${BASE_FILES}) wx_add_library(wxbase IS_BASE ${BASE_FILES})
if(NOT wxBUILD_MONOLITHIC) if(NOT wxBUILD_MONOLITHIC)
wx_lib_compile_definitions(base PRIVATE wxUSE_BASE=1) wx_lib_compile_definitions(wxbase PRIVATE wxUSE_BASE=1)
endif() endif()
if(wxUSE_ZLIB) if(wxUSE_ZLIB)
wx_lib_include_directories(base PRIVATE ${ZLIB_INCLUDE_DIRS}) wx_lib_include_directories(wxbase PRIVATE ${ZLIB_INCLUDE_DIRS})
wx_lib_link_libraries(base PRIVATE ${ZLIB_LIBRARIES}) wx_lib_link_libraries(wxbase PRIVATE ${ZLIB_LIBRARIES})
endif() endif()
if(wxUSE_REGEX) if(wxUSE_REGEX)
wx_lib_include_directories(base PRIVATE ${REGEX_INCLUDE_DIRS}) wx_lib_include_directories(wxbase PRIVATE ${REGEX_INCLUDE_DIRS})
wx_lib_link_libraries(base PRIVATE ${REGEX_LIBRARIES}) wx_lib_link_libraries(wxbase PRIVATE ${REGEX_LIBRARIES})
endif() endif()
if(wxUSE_LIBLZMA) if(wxUSE_LIBLZMA)
wx_lib_include_directories(base PRIVATE ${LIBLZMA_INCLUDE_DIRS}) wx_lib_include_directories(wxbase PRIVATE ${LIBLZMA_INCLUDE_DIRS})
wx_lib_link_libraries(base PRIVATE ${LIBLZMA_LIBRARIES}) wx_lib_link_libraries(wxbase PRIVATE ${LIBLZMA_LIBRARIES})
endif() endif()
if(UNIX AND wxUSE_SECRETSTORE) if(UNIX AND wxUSE_SECRETSTORE)
wx_lib_include_directories(base PRIVATE ${LIBSECRET_INCLUDE_DIRS}) wx_lib_include_directories(wxbase PRIVATE ${LIBSECRET_INCLUDE_DIRS})
wx_lib_link_libraries(base PRIVATE ${LIBSECRET_LIBRARIES}) wx_lib_link_libraries(wxbase PRIVATE ${LIBSECRET_LIBRARIES})
endif() endif()
if(wxUSE_LIBICONV) if(wxUSE_LIBICONV)
wx_lib_include_directories(base PRIVATE ${ICONV_INCLUDE_DIR}) wx_lib_include_directories(wxbase PRIVATE ${ICONV_INCLUDE_DIR})
wx_lib_link_libraries(base PRIVATE ${ICONV_LIBRARIES}) wx_lib_link_libraries(wxbase PRIVATE ${ICONV_LIBRARIES})
endif() endif()
if(wxUSE_THREADS AND CMAKE_THREAD_LIBS_INIT) if(wxUSE_THREADS AND CMAKE_THREAD_LIBS_INIT)
wx_lib_link_libraries(base PRIVATE ${CMAKE_THREAD_LIBS_INIT}) wx_lib_link_libraries(wxbase PRIVATE ${CMAKE_THREAD_LIBS_INIT})
endif() endif()
if(APPLE) if(APPLE)
wx_lib_link_libraries(base wx_lib_link_libraries(wxbase
PRIVATE PRIVATE
"-framework Security" "-framework Security"
PUBLIC PUBLIC
@@ -67,7 +67,7 @@ if(APPLE)
"-framework IOKit" "-framework IOKit"
) )
elseif(UNIX) elseif(UNIX)
wx_lib_link_libraries(base PRIVATE dl) wx_lib_link_libraries(wxbase PRIVATE dl)
endif() endif()
wx_finalize_lib(base) wx_finalize_lib(wxbase)

View File

@@ -54,44 +54,44 @@ elseif(WXQT)
endif() endif()
endif() endif()
wx_add_library(core ${CORE_SRC}) wx_add_library(wxcore ${CORE_SRC})
foreach(lib JPEG PNG TIFF) foreach(lib JPEG PNG TIFF)
if(${lib}_LIBRARIES) if(${lib}_LIBRARIES)
if(lib STREQUAL JPEG) if(lib STREQUAL JPEG)
wx_lib_include_directories(core PRIVATE ${${lib}_INCLUDE_DIR}) wx_lib_include_directories(wxcore PRIVATE ${${lib}_INCLUDE_DIR})
else() else()
wx_lib_include_directories(core PRIVATE ${${lib}_INCLUDE_DIRS}) wx_lib_include_directories(wxcore PRIVATE ${${lib}_INCLUDE_DIRS})
endif() endif()
wx_lib_link_libraries(core PRIVATE ${${lib}_LIBRARIES}) wx_lib_link_libraries(wxcore PRIVATE ${${lib}_LIBRARIES})
endif() endif()
endforeach() endforeach()
if(WIN32) if(WIN32)
wx_lib_link_libraries(core PRIVATE winmm) wx_lib_link_libraries(wxcore PRIVATE winmm)
endif() endif()
if(WXOSX_COCOA) if(WXOSX_COCOA)
wx_lib_link_libraries(core PUBLIC "-framework AudioToolbox") wx_lib_link_libraries(wxcore PUBLIC "-framework AudioToolbox")
if(wxUSE_WEBKIT) if(wxUSE_WEBKIT)
wx_lib_link_libraries(core PUBLIC "-framework WebKit") wx_lib_link_libraries(wxcore PUBLIC "-framework WebKit")
endif() endif()
endif() endif()
if(WXGTK AND wxUSE_PRIVATE_FONTS) if(WXGTK AND wxUSE_PRIVATE_FONTS)
wx_lib_include_directories(core PUBLIC ${FONTCONFIG_INCLUDE_DIRS} ${PANGOFT2_INCLUDE_DIRS}) wx_lib_include_directories(wxcore PUBLIC ${FONTCONFIG_INCLUDE_DIRS} ${PANGOFT2_INCLUDE_DIRS})
wx_lib_link_libraries(core PUBLIC ${FONTCONFIG_LIBRARIES} ${PANGOFT2_LIBRARIES}) wx_lib_link_libraries(wxcore PUBLIC ${FONTCONFIG_LIBRARIES} ${PANGOFT2_LIBRARIES})
endif() endif()
if(wxUSE_LIBSDL) if(wxUSE_LIBSDL)
if(SDL2_FOUND) if(SDL2_FOUND)
wx_lib_include_directories(core PUBLIC ${SDL2_INCLUDE_DIR}) wx_lib_include_directories(wxcore PUBLIC ${SDL2_INCLUDE_DIR})
wx_lib_link_libraries(core PUBLIC ${SDL2_LIBRARY}) wx_lib_link_libraries(wxcore PUBLIC ${SDL2_LIBRARY})
elseif(SDL_FOUND) elseif(SDL_FOUND)
wx_lib_include_directories(core PUBLIC ${SDL_INCLUDE_DIR}) wx_lib_include_directories(wxcore PUBLIC ${SDL_INCLUDE_DIR})
wx_lib_link_libraries(core PUBLIC ${SDL_LIBRARY}) wx_lib_link_libraries(wxcore PUBLIC ${SDL_LIBRARY})
endif() endif()
endif() endif()
if(wxUSE_LIBNOTIFY) if(wxUSE_LIBNOTIFY)
wx_lib_include_directories(core PUBLIC ${LIBNOTIFY_INCLUDE_DIRS}) wx_lib_include_directories(wxcore PUBLIC ${LIBNOTIFY_INCLUDE_DIRS})
wx_lib_link_libraries(core PUBLIC ${LIBNOTIFY_LIBRARIES}) wx_lib_link_libraries(wxcore PUBLIC ${LIBNOTIFY_LIBRARIES})
endif() endif()
wx_finalize_lib(core) wx_finalize_lib(wxcore)

View File

@@ -21,8 +21,8 @@ elseif(WXQT)
wx_append_sources(GL_FILES OPENGL_QT) wx_append_sources(GL_FILES OPENGL_QT)
endif() endif()
wx_add_library(gl ${GL_FILES}) wx_add_library(wxgl ${GL_FILES})
wx_lib_include_directories(gl PUBLIC ${OPENGL_INCLUDE_DIR}) wx_lib_include_directories(wxgl PUBLIC ${OPENGL_INCLUDE_DIR})
wx_lib_link_libraries(gl PUBLIC ${OPENGL_LIBRARIES}) wx_lib_link_libraries(wxgl PUBLIC ${OPENGL_LIBRARIES})
wx_finalize_lib(gl) wx_finalize_lib(wxgl)

View File

@@ -15,11 +15,11 @@ if(WIN32 OR wxUSE_LIBMSPACK)
wx_append_sources(HTML_FILES HTML_MSW) wx_append_sources(HTML_FILES HTML_MSW)
endif() endif()
wx_add_library(html ${HTML_FILES}) wx_add_library(wxhtml ${HTML_FILES})
if(wxUSE_LIBMSPACK) if(wxUSE_LIBMSPACK)
wx_lib_include_directories(html PRIVATE ${MSPACK_INCLUDE_DIRS}) wx_lib_include_directories(wxhtml PRIVATE ${MSPACK_INCLUDE_DIRS})
wx_lib_link_libraries(html PRIVATE ${MSPACK_LIBRARIES}) wx_lib_link_libraries(wxhtml PRIVATE ${MSPACK_LIBRARIES})
endif() endif()
wx_finalize_lib(html) wx_finalize_lib(wxhtml)

View File

@@ -21,37 +21,37 @@ elseif(WXQT)
wx_append_sources(MEDIA_FILES MEDIA_QT) wx_append_sources(MEDIA_FILES MEDIA_QT)
endif() endif()
wx_add_library(media ${MEDIA_FILES}) wx_add_library(wxmedia ${MEDIA_FILES})
if(WXOSX_COCOA) if(WXOSX_COCOA)
# TODO: add version detection of some kind and/or wx_option # TODO: add version detection of some kind and/or wx_option
wx_lib_compile_definitions(media PRIVATE -DwxOSX_USE_QTKIT=0) wx_lib_compile_definitions(wxmedia PRIVATE -DwxOSX_USE_QTKIT=0)
wx_lib_link_libraries(media PUBLIC wx_lib_link_libraries(wxmedia PUBLIC
"-framework AVFoundation" "-framework AVFoundation"
"-framework AVKit" "-framework AVKit"
"-framework CoreMedia" "-framework CoreMedia"
) )
elseif(UNIX) elseif(UNIX)
wx_lib_include_directories(media PUBLIC ${GSTREAMER_INCLUDE_DIRS}) wx_lib_include_directories(wxmedia PUBLIC ${GSTREAMER_INCLUDE_DIRS})
if(GSTREAMER_INTERFACES_INCLUDE_DIRS) if(GSTREAMER_INTERFACES_INCLUDE_DIRS)
wx_lib_include_directories(media PUBLIC ${GSTREAMER_INTERFACES_INCLUDE_DIRS}) wx_lib_include_directories(wxmedia PUBLIC ${GSTREAMER_INTERFACES_INCLUDE_DIRS})
endif() endif()
if(GSTREAMER_VIDEO_INCLUDE_DIRS) if(GSTREAMER_VIDEO_INCLUDE_DIRS)
wx_lib_include_directories(media PUBLIC ${GSTREAMER_VIDEO_INCLUDE_DIRS}) wx_lib_include_directories(wxmedia PUBLIC ${GSTREAMER_VIDEO_INCLUDE_DIRS})
endif() endif()
if(GSTREAMER_PLAYER_INCLUDE_DIRS) if(GSTREAMER_PLAYER_INCLUDE_DIRS)
wx_lib_include_directories(media PUBLIC ${GSTREAMER_PLAYER_INCLUDE_DIRS}) wx_lib_include_directories(wxmedia PUBLIC ${GSTREAMER_PLAYER_INCLUDE_DIRS})
endif() endif()
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_LIBRARIES}) wx_lib_link_libraries(wxmedia PUBLIC ${GSTREAMER_LIBRARIES})
if(GSTREAMER_INTERFACES_LIBRARIES) if(GSTREAMER_INTERFACES_LIBRARIES)
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_INTERFACES_LIBRARIES}) wx_lib_link_libraries(wxmedia PUBLIC ${GSTREAMER_INTERFACES_LIBRARIES})
endif() endif()
if(GSTREAMER_VIDEO_LIBRARIES) if(GSTREAMER_VIDEO_LIBRARIES)
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_VIDEO_LIBRARIES}) wx_lib_link_libraries(wxmedia PUBLIC ${GSTREAMER_VIDEO_LIBRARIES})
endif() endif()
if(GSTREAMER_PLAYER_LIBRARIES) if(GSTREAMER_PLAYER_LIBRARIES)
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_PLAYER_LIBRARIES}) wx_lib_link_libraries(wxmedia PUBLIC ${GSTREAMER_PLAYER_LIBRARIES})
endif() endif()
endif() endif()
wx_finalize_lib(media) wx_finalize_lib(wxmedia)

View File

@@ -21,10 +21,10 @@ if(UNIX AND NOT WIN32)
wx_append_sources(NET_FILES NET_UNIX) wx_append_sources(NET_FILES NET_UNIX)
endif() endif()
wx_add_library(net IS_BASE ${NET_FILES}) wx_add_library(wxnet IS_BASE ${NET_FILES})
if(WIN32) if(WIN32)
wx_lib_link_libraries(net PRIVATE ws2_32) wx_lib_link_libraries(wxnet PRIVATE ws2_32)
endif() endif()
wx_finalize_lib(net) wx_finalize_lib(wxnet)

View File

@@ -11,6 +11,6 @@ include(../../source_groups.cmake)
wx_append_sources(PROPGRID_FILES PROPGRID) wx_append_sources(PROPGRID_FILES PROPGRID)
wx_add_library(propgrid ${PROPGRID_FILES}) wx_add_library(wxpropgrid ${PROPGRID_FILES})
wx_finalize_lib(propgrid) wx_finalize_lib(wxpropgrid)

View File

@@ -11,7 +11,7 @@ include(../../source_groups.cmake)
wx_append_sources(QA_FILES QA) wx_append_sources(QA_FILES QA)
wx_add_library(qa ${QA_FILES}) wx_add_library(wxqa ${QA_FILES})
wx_lib_link_libraries(qa PUBLIC xml) wx_lib_link_libraries(wxqa PUBLIC wxxml)
wx_finalize_lib(qa) wx_finalize_lib(wxqa)

View File

@@ -11,6 +11,6 @@ include(../../source_groups.cmake)
wx_append_sources(RIBBON_FILES RIBBON) wx_append_sources(RIBBON_FILES RIBBON)
wx_add_library(ribbon ${RIBBON_FILES}) wx_add_library(wxribbon ${RIBBON_FILES})
wx_finalize_lib(ribbon) wx_finalize_lib(wxribbon)

View File

@@ -11,7 +11,7 @@ include(../../source_groups.cmake)
wx_append_sources(RICHTEXT_FILES RICHTEXT) wx_append_sources(RICHTEXT_FILES RICHTEXT)
wx_add_library(richtext ${RICHTEXT_FILES}) wx_add_library(wxrichtext ${RICHTEXT_FILES})
wx_lib_link_libraries(richtext PRIVATE html xml) wx_lib_link_libraries(wxrichtext PRIVATE wxhtml wxxml)
wx_finalize_lib(richtext) wx_finalize_lib(wxrichtext)

View File

@@ -182,18 +182,18 @@ if(wxBUILD_PRECOMP)
wx_target_enable_precomp(wxscintilla ${wxSCINTILLA_PREC_HEADER}) wx_target_enable_precomp(wxscintilla ${wxSCINTILLA_PREC_HEADER})
endif() endif()
wx_add_library(stc ${STC_FILES}) wx_add_library(wxstc ${STC_FILES})
wx_lib_include_directories(stc PRIVATE wx_lib_include_directories(wxstc PRIVATE
${wxSOURCE_DIR}/src/stc/scintilla/include ${wxSOURCE_DIR}/src/stc/scintilla/include
${wxSOURCE_DIR}/src/stc/scintilla/lexlib ${wxSOURCE_DIR}/src/stc/scintilla/lexlib
${wxSOURCE_DIR}/src/stc/scintilla/src ${wxSOURCE_DIR}/src/stc/scintilla/src
) )
wx_lib_compile_definitions(stc PRIVATE wx_lib_compile_definitions(wxstc PRIVATE
NO_CXX11_REGEX NO_CXX11_REGEX
__WX__ __WX__
SCI_LEXER SCI_LEXER
LINK_LEXERS LINK_LEXERS
) )
wx_lib_link_libraries(stc PRIVATE wxscintilla) wx_lib_link_libraries(wxstc PRIVATE wxscintilla)
wx_finalize_lib(stc) wx_finalize_lib(wxstc)

View File

@@ -23,20 +23,20 @@ elseif(APPLE)
wx_append_sources(WEBVIEW_FILES WEBVIEW_OSX_SHARED) wx_append_sources(WEBVIEW_FILES WEBVIEW_OSX_SHARED)
endif() endif()
wx_add_library(webview ${WEBVIEW_FILES}) wx_add_library(wxwebview ${WEBVIEW_FILES})
if(WXGTK AND wxUSE_WEBVIEW_WEBKIT2) if(WXGTK AND wxUSE_WEBVIEW_WEBKIT2)
set(WX_WEB_EXTENSIONS_DIRECTORY "lib/wx/${wxMAJOR_VERSION}.${wxMINOR_VERSION}/web-extensions") set(WX_WEB_EXTENSIONS_DIRECTORY "lib/wx/${wxMAJOR_VERSION}.${wxMINOR_VERSION}/web-extensions")
wx_lib_compile_definitions(webview PRIVATE wx_lib_compile_definitions(wxwebview PRIVATE
-DWX_WEB_EXTENSIONS_DIRECTORY="${CMAKE_INSTALL_PREFIX}/${WX_WEB_EXTENSIONS_DIRECTORY}" -DWX_WEB_EXTENSIONS_DIRECTORY="${CMAKE_INSTALL_PREFIX}/${WX_WEB_EXTENSIONS_DIRECTORY}"
) )
endif() endif()
if(APPLE) if(APPLE)
wx_lib_link_libraries(webview PUBLIC "-framework WebKit") wx_lib_link_libraries(wxwebview PUBLIC "-framework WebKit")
elseif(WXMSW) elseif(WXMSW)
if(wxUSE_WEBVIEW_EDGE) if(wxUSE_WEBVIEW_EDGE)
wx_lib_include_directories(webview PRIVATE "${PROJECT_SOURCE_DIR}/3rdparty/webview2/build/native/include") wx_lib_include_directories(wxwebview PRIVATE "${PROJECT_SOURCE_DIR}/3rdparty/webview2/build/native/include")
if (CMAKE_SIZEOF_VOID_P EQUAL 4) if (CMAKE_SIZEOF_VOID_P EQUAL 4)
set(WEBVIEW2_ARCH x86) set(WEBVIEW2_ARCH x86)
@@ -44,55 +44,55 @@ elseif(WXMSW)
set(WEBVIEW2_ARCH x64) set(WEBVIEW2_ARCH x64)
endif() endif()
add_custom_command(TARGET webview POST_BUILD add_custom_command(TARGET wxwebview POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy COMMAND ${CMAKE_COMMAND} -E copy
"${PROJECT_SOURCE_DIR}/3rdparty/webview2/build/native/${WEBVIEW2_ARCH}/WebView2Loader.dll" "${PROJECT_SOURCE_DIR}/3rdparty/webview2/build/native/${WEBVIEW2_ARCH}/WebView2Loader.dll"
"$<TARGET_FILE_DIR:webview>/WebView2Loader.dll") "$<TARGET_FILE_DIR:wxwebview>/WebView2Loader.dll")
endif() endif()
elseif(WXGTK) elseif(WXGTK)
if(LIBSOUP_FOUND) if(LIBSOUP_FOUND)
wx_lib_include_directories(webview PUBLIC ${LIBSOUP_INCLUDE_DIRS}) wx_lib_include_directories(wxwebview PUBLIC ${LIBSOUP_INCLUDE_DIRS})
wx_lib_link_libraries(webview PUBLIC ${LIBSOUP_LIBRARIES}) wx_lib_link_libraries(wxwebview PUBLIC ${LIBSOUP_LIBRARIES})
endif() endif()
if(wxUSE_WEBVIEW_WEBKIT2) if(wxUSE_WEBVIEW_WEBKIT2)
wx_lib_include_directories(webview PUBLIC ${WEBKIT2_INCLUDE_DIR}) wx_lib_include_directories(wxwebview PUBLIC ${WEBKIT2_INCLUDE_DIR})
wx_lib_link_libraries(webview PUBLIC ${WEBKIT2_LIBRARIES}) wx_lib_link_libraries(wxwebview PUBLIC ${WEBKIT2_LIBRARIES})
elseif(wxUSE_WEBVIEW_WEBKIT) elseif(wxUSE_WEBVIEW_WEBKIT)
wx_lib_include_directories(webview PUBLIC ${WEBKIT_INCLUDE_DIR}) wx_lib_include_directories(wxwebview PUBLIC ${WEBKIT_INCLUDE_DIR})
wx_lib_link_libraries(webview PUBLIC ${WEBKIT_LIBRARIES}) wx_lib_link_libraries(wxwebview PUBLIC ${WEBKIT_LIBRARIES})
endif() endif()
endif() endif()
wx_finalize_lib(webview) wx_finalize_lib(wxwebview)
# webkit extension plugin # webkit extension plugin
# we can't use (all of the) macros and functions because this library should # we can't use (all of the) macros and functions because this library should
# always be build as a shared libary, and not included in the monolithic build. # always be build as a shared libary, and not included in the monolithic build.
if(WXGTK AND wxUSE_WEBVIEW_WEBKIT2) if(WXGTK AND wxUSE_WEBVIEW_WEBKIT2)
wx_append_sources(WEBKIT2_EXT_FILES WEBVIEW_WEBKIT2_EXTENSION) wx_append_sources(WEBKIT2_EXT_FILES WEBVIEW_WEBKIT2_EXTENSION)
add_library(webkit2_ext SHARED ${WEBKIT2_EXT_FILES}) add_library(wxwebkit2_ext SHARED ${WEBKIT2_EXT_FILES})
wx_set_target_properties(webkit2_ext false) wx_set_target_properties(wxwebkit2_ext false)
# Change output name to match expected name in webview_webkit2.cpp: webkit2_ext* # Change output name to match expected name in webview_webkit2.cpp: webkit2_ext*
if(wxUSE_UNICODE) if(wxUSE_UNICODE)
set(lib_unicode u) set(lib_unicode u)
endif() endif()
set_target_properties(webkit2_ext PROPERTIES PREFIX "") set_target_properties(wxwebkit2_ext PROPERTIES PREFIX "")
set_target_properties(webkit2_ext PROPERTIES set_target_properties(wxwebkit2_ext PROPERTIES
OUTPUT_NAME "webkit2_ext${lib_unicode}-${wxMAJOR_VERSION}.${wxMINOR_VERSION}" OUTPUT_NAME "webkit2_ext${lib_unicode}-${wxMAJOR_VERSION}.${wxMINOR_VERSION}"
OUTPUT_NAME_DEBUG "webkit2_ext${lib_unicode}d-${wxMAJOR_VERSION}.${wxMINOR_VERSION}" OUTPUT_NAME_DEBUG "webkit2_ext${lib_unicode}d-${wxMAJOR_VERSION}.${wxMINOR_VERSION}"
) )
target_include_directories(webkit2_ext PUBLIC target_include_directories(wxwebkit2_ext PUBLIC
${LIBSOUP_INCLUDE_DIRS} ${LIBSOUP_INCLUDE_DIRS}
${WEBKIT2_INCLUDE_DIR} ${WEBKIT2_INCLUDE_DIR}
) )
target_link_libraries(webkit2_ext PUBLIC target_link_libraries(wxwebkit2_ext PUBLIC
${LIBSOUP_LIBRARIES} ${LIBSOUP_LIBRARIES}
${WEBKIT2_LIBRARIES} ${WEBKIT2_LIBRARIES}
) )
wx_install(TARGETS webkit2_ext LIBRARY DESTINATION ${WX_WEB_EXTENSIONS_DIRECTORY}) wx_install(TARGETS wxwebkit2_ext LIBRARY DESTINATION ${WX_WEB_EXTENSIONS_DIRECTORY})
add_dependencies(webview webkit2_ext) add_dependencies(wxwebview wxwebkit2_ext)
endif() endif()

View File

@@ -10,8 +10,8 @@
include(../../source_groups.cmake) include(../../source_groups.cmake)
wx_append_sources(XML_FILES XML) wx_append_sources(XML_FILES XML)
wx_add_library(xml IS_BASE ${XML_FILES}) wx_add_library(wxxml IS_BASE ${XML_FILES})
wx_lib_link_libraries(xml PRIVATE ${EXPAT_LIBRARIES}) wx_lib_link_libraries(wxxml PRIVATE ${EXPAT_LIBRARIES})
wx_lib_include_directories(xml PRIVATE ${EXPAT_INCLUDE_DIRS}) wx_lib_include_directories(wxxml PRIVATE ${EXPAT_INCLUDE_DIRS})
wx_finalize_lib(xml) wx_finalize_lib(wxxml)

View File

@@ -11,7 +11,7 @@ include(../../source_groups.cmake)
wx_append_sources(XRC_FILES XRC) wx_append_sources(XRC_FILES XRC)
wx_add_library(xrc ${XRC_FILES}) wx_add_library(wxxrc ${XRC_FILES})
wx_lib_link_libraries(xrc PRIVATE html xml) wx_lib_link_libraries(wxxrc PRIVATE wxhtml wxxml)
wx_finalize_lib(xrc) wx_finalize_lib(wxxrc)

View File

@@ -11,7 +11,7 @@ wx_add_sample(access accesstest.cpp DEPENDS wxUSE_ACCESSIBILITY)
wx_add_sample(animate anitest.cpp anitest.h DATA throbber.gif hourglass.ani DEPENDS wxUSE_ANIMATIONCTRL) wx_add_sample(animate anitest.cpp anitest.h DATA throbber.gif hourglass.ani DEPENDS wxUSE_ANIMATIONCTRL)
wx_add_sample(archive CONSOLE) wx_add_sample(archive CONSOLE)
wx_add_sample(artprov arttest.cpp artbrows.cpp artbrows.h) wx_add_sample(artprov arttest.cpp artbrows.cpp artbrows.h)
wx_add_sample(aui auidemo.cpp LIBRARIES aui html NAME auidemo DEPENDS wxUSE_AUI) wx_add_sample(aui auidemo.cpp LIBRARIES wxaui wxhtml NAME auidemo DEPENDS wxUSE_AUI)
wx_add_sample(calendar RES calendar.rc DEPENDS wxUSE_CALENDARCTRL) wx_add_sample(calendar RES calendar.rc DEPENDS wxUSE_CALENDARCTRL)
wx_add_sample(caret DEPENDS wxUSE_CARET) wx_add_sample(caret DEPENDS wxUSE_CARET)
wx_add_sample(clipboard DEPENDS wxUSE_CLIPBOARD) wx_add_sample(clipboard DEPENDS wxUSE_CLIPBOARD)
@@ -21,7 +21,7 @@ wx_add_sample(config conftest.cpp DEPENDS wxUSE_CONFIG)
wx_add_sample(console CONSOLE IMPORTANT) wx_add_sample(console CONSOLE IMPORTANT)
wx_add_sample(dataview IMPORTANT dataview.cpp mymodels.cpp mymodels.h DEPENDS wxUSE_DATAVIEWCTRL) wx_add_sample(dataview IMPORTANT dataview.cpp mymodels.cpp mymodels.h DEPENDS wxUSE_DATAVIEWCTRL)
if(wxUSE_ON_FATAL_EXCEPTION AND (NOT WIN32 OR MSVC)) if(wxUSE_ON_FATAL_EXCEPTION AND (NOT WIN32 OR MSVC))
wx_add_sample(debugrpt LIBRARIES qa DEPENDS wxUSE_DEBUGREPORT) wx_add_sample(debugrpt LIBRARIES wxqa DEPENDS wxUSE_DEBUGREPORT)
endif() endif()
set(SAMPLE_DIALOGS_SRC dialogs.cpp dialogs.h) set(SAMPLE_DIALOGS_SRC dialogs.cpp dialogs.h)
if(NOT wxBUILD_SHARED AND (WXMSW OR APPLE)) # AND NOT WXUNIV if(NOT wxBUILD_SHARED AND (WXMSW OR APPLE)) # AND NOT WXUNIV
@@ -34,11 +34,11 @@ if(WXGTK2)
wx_list_add_prefix(SAMPLE_DIALOGS_SRC ../../src/generic/ filedlgg.cpp) wx_list_add_prefix(SAMPLE_DIALOGS_SRC ../../src/generic/ filedlgg.cpp)
endif() endif()
wx_add_sample(dialogs ${SAMPLE_DIALOGS_SRC} DATA tips.txt) wx_add_sample(dialogs ${SAMPLE_DIALOGS_SRC} DATA tips.txt)
wx_add_sample(dialup nettest.cpp LIBRARIES net DEPENDS wxUSE_DIALUP_MANAGER) wx_add_sample(dialup nettest.cpp LIBRARIES wxnet DEPENDS wxUSE_DIALUP_MANAGER)
wx_add_sample(display) wx_add_sample(display)
wx_add_sample(dnd dnd.cpp RES dnd.rc DATA wxwin.png DEPENDS wxUSE_DRAG_AND_DROP) wx_add_sample(dnd dnd.cpp RES dnd.rc DATA wxwin.png DEPENDS wxUSE_DRAG_AND_DROP)
wx_add_sample(docview docview.cpp doc.cpp view.cpp docview.h doc.h view.h wx_add_sample(docview docview.cpp doc.cpp view.cpp docview.h doc.h view.h
RES docview.rc LIBRARIES aui DEPENDS wxUSE_DOC_VIEW_ARCHITECTURE) RES docview.rc LIBRARIES wxaui DEPENDS wxUSE_DOC_VIEW_ARCHITECTURE)
wx_add_sample(dragimag dragimag.cpp dragimag.h RES dragimag.rc wx_add_sample(dragimag dragimag.cpp dragimag.h RES dragimag.rc
DATA backgrnd.png shape01.png shape02.png shape03.png DATA backgrnd.png shape01.png shape02.png shape03.png
DEPENDS wxUSE_DRAGIMAGE) DEPENDS wxUSE_DRAGIMAGE)
@@ -55,7 +55,7 @@ wx_list_add_prefix(HELP_DOC_FILES doc/
aindex.html down.gif dxxgifs.tex HIER.html icon1.gif icon2.gif index.html aindex.html down.gif dxxgifs.tex HIER.html icon1.gif icon2.gif index.html
logo.gif wx204.htm wx34.htm wxExtHelpController.html wxhelp.map wx.htm logo.gif wx204.htm wx34.htm wxExtHelpController.html wxhelp.map wx.htm
) )
wx_add_sample(help demo.cpp LIBRARIES html wx_add_sample(help demo.cpp LIBRARIES wxhtml
DATA DATA
back.gif bullet.bmp contents.gif cshelp.txt doc.chm doc.cnt doc.hhc back.gif bullet.bmp contents.gif cshelp.txt doc.chm doc.cnt doc.hhc
doc.hhk doc.hhp doc.hlp doc.hpj doc.zip forward.gif up.gif doc.hhk doc.hhp doc.hlp doc.hpj doc.zip forward.gif up.gif
@@ -63,7 +63,7 @@ wx_add_sample(help demo.cpp LIBRARIES html
NAME helpdemo NAME helpdemo
DEPENDS wxUSE_HELP DEPENDS wxUSE_HELP
) )
wx_add_sample(htlbox LIBRARIES html DEPENDS wxUSE_HTML) wx_add_sample(htlbox LIBRARIES wxhtml DEPENDS wxUSE_HTML)
if(wxUSE_HTML) if(wxUSE_HTML)
include(html.cmake) include(html.cmake)
endif() endif()
@@ -78,35 +78,35 @@ endforeach()
wx_add_sample(internat DATA ${INTERNAT_DATA_FILES} DEPENDS wxUSE_INTL) wx_add_sample(internat DATA ${INTERNAT_DATA_FILES} DEPENDS wxUSE_INTL)
# IPC samples # IPC samples
set(wxSAMPLE_FOLDER ipc) set(wxSAMPLE_FOLDER ipc)
wx_add_sample(ipc client.cpp client.h connection.h ipcsetup.h NAME ipcclient LIBRARIES net DEPENDS wxUSE_IPC) wx_add_sample(ipc client.cpp client.h connection.h ipcsetup.h NAME ipcclient LIBRARIES wxnet DEPENDS wxUSE_IPC)
wx_add_sample(ipc server.cpp server.h connection.h ipcsetup.h NAME ipcserver LIBRARIES net DEPENDS wxUSE_IPC) wx_add_sample(ipc server.cpp server.h connection.h ipcsetup.h NAME ipcserver LIBRARIES wxnet DEPENDS wxUSE_IPC)
wx_add_sample(ipc CONSOLE baseclient.cpp connection.h ipcsetup.h NAME baseipcclient LIBRARIES net DEPENDS wxUSE_IPC) wx_add_sample(ipc CONSOLE baseclient.cpp connection.h ipcsetup.h NAME baseipcclient LIBRARIES wxnet DEPENDS wxUSE_IPC)
wx_add_sample(ipc CONSOLE baseserver.cpp connection.h ipcsetup.h NAME baseipcserver LIBRARIES net DEPENDS wxUSE_IPC) wx_add_sample(ipc CONSOLE baseserver.cpp connection.h ipcsetup.h NAME baseipcserver LIBRARIES wxnet DEPENDS wxUSE_IPC)
set(wxSAMPLE_FOLDER) set(wxSAMPLE_FOLDER)
wx_add_sample(joytest joytest.cpp joytest.h DATA buttonpress.wav DEPENDS wxUSE_JOYSTICK) wx_add_sample(joytest joytest.cpp joytest.h DATA buttonpress.wav DEPENDS wxUSE_JOYSTICK)
wx_add_sample(keyboard) wx_add_sample(keyboard)
wx_add_sample(layout layout.cpp layout.h) wx_add_sample(layout layout.cpp layout.h)
wx_add_sample(listctrl listtest.cpp listtest.h RES listtest.rc DEPENDS wxUSE_LISTCTRL) wx_add_sample(listctrl listtest.cpp listtest.h RES listtest.rc DEPENDS wxUSE_LISTCTRL)
wx_add_sample(mdi mdi.cpp mdi.h RES mdi.rc DEPENDS wxUSE_MDI wxUSE_DOC_VIEW_ARCHITECTURE wxUSE_MDI_ARCHITECTURE) wx_add_sample(mdi mdi.cpp mdi.h RES mdi.rc DEPENDS wxUSE_MDI wxUSE_DOC_VIEW_ARCHITECTURE wxUSE_MDI_ARCHITECTURE)
wx_add_sample(mediaplayer LIBRARIES media DEPENDS wxUSE_MEDIACTRL) wx_add_sample(mediaplayer LIBRARIES wxmedia DEPENDS wxUSE_MEDIACTRL)
wx_add_sample(memcheck) wx_add_sample(memcheck)
wx_add_sample(menu DEPENDS wxUSE_MENUS) wx_add_sample(menu DEPENDS wxUSE_MENUS)
wx_add_sample(minimal IMPORTANT) wx_add_sample(minimal IMPORTANT)
wx_add_sample(notebook notebook.cpp notebook.h LIBRARIES aui DEPENDS wxUSE_NOTEBOOK) wx_add_sample(notebook notebook.cpp notebook.h LIBRARIES wxaui DEPENDS wxUSE_NOTEBOOK)
if(wxUSE_OPENGL) if(wxUSE_OPENGL)
set(wxSAMPLE_SUBDIR opengl/) set(wxSAMPLE_SUBDIR opengl/)
set(wxSAMPLE_FOLDER OpenGL) set(wxSAMPLE_FOLDER OpenGL)
wx_add_sample(cube cube.cpp cube.h LIBRARIES gl) wx_add_sample(cube cube.cpp cube.h LIBRARIES wxgl)
wx_add_sample(isosurf isosurf.cpp isosurf.h LIBRARIES gl DATA isosurf.dat.gz) wx_add_sample(isosurf isosurf.cpp isosurf.h LIBRARIES wxgl DATA isosurf.dat.gz)
wx_add_sample(penguin wx_add_sample(penguin
penguin.cpp dxfrenderer.cpp trackball.c penguin.cpp dxfrenderer.cpp trackball.c
dxfrenderer.h penguin.h trackball.h dxfrenderer.h penguin.h trackball.h
LIBRARIES gl LIBRARIES wxgl
DATA penguin.dxf.gz) DATA penguin.dxf.gz)
wx_add_sample(pyramid wx_add_sample(pyramid
pyramid.cpp oglstuff.cpp mathstuff.cpp oglpfuncs.cpp pyramid.cpp oglstuff.cpp mathstuff.cpp oglpfuncs.cpp
pyramid.h oglstuff.h mathstuff.h oglpfuncs.h pyramid.h oglstuff.h mathstuff.h oglpfuncs.h
LIBRARIES gl) LIBRARIES wxgl)
set(wxSAMPLE_SUBDIR) set(wxSAMPLE_SUBDIR)
set(wxSAMPLE_FOLDER) set(wxSAMPLE_FOLDER)
endif() endif()
@@ -116,30 +116,30 @@ wx_add_sample(power)
wx_add_sample(preferences DEPENDS wxUSE_PREFERENCES_EDITOR) wx_add_sample(preferences DEPENDS wxUSE_PREFERENCES_EDITOR)
wx_add_sample(printing printing.cpp printing.h DEPENDS wxUSE_PRINTING_ARCHITECTURE) wx_add_sample(printing printing.cpp printing.h DEPENDS wxUSE_PRINTING_ARCHITECTURE)
wx_add_sample(propgrid propgrid.cpp propgrid_minimal.cpp sampleprops.cpp wx_add_sample(propgrid propgrid.cpp propgrid_minimal.cpp sampleprops.cpp
tests.cpp sampleprops.h propgrid.h LIBRARIES propgrid NAME propgriddemo DEPENDS wxUSE_PROPGRID) tests.cpp sampleprops.h propgrid.h LIBRARIES wxpropgrid NAME propgriddemo DEPENDS wxUSE_PROPGRID)
wx_add_sample(render FOLDER render) wx_add_sample(render FOLDER render)
wx_add_sample(render DLL renddll.cpp NAME renddll FOLDER render) wx_add_sample(render DLL renddll.cpp NAME renddll FOLDER render)
wx_add_sample(ribbon ribbondemo.cpp LIBRARIES ribbon NAME ribbondemo DEPENDS wxUSE_RIBBON) wx_add_sample(ribbon ribbondemo.cpp LIBRARIES wxribbon NAME ribbondemo DEPENDS wxUSE_RIBBON)
wx_add_sample(richtext LIBRARIES richtext html xml NAME richtextdemo DEPENDS wxUSE_XML wxUSE_RICHTEXT) wx_add_sample(richtext LIBRARIES wxrichtext wxhtml wxxml NAME richtextdemo DEPENDS wxUSE_XML wxUSE_RICHTEXT)
wx_add_sample(sashtest sashtest.cpp sashtest.h RES sashtest.rc DEPENDS wxUSE_SASH) wx_add_sample(sashtest sashtest.cpp sashtest.h RES sashtest.rc DEPENDS wxUSE_SASH)
wx_add_sample(scroll) wx_add_sample(scroll)
wx_add_sample(secretstore CONSOLE DEPENDS wxUSE_SECRETSTORE) wx_add_sample(secretstore CONSOLE DEPENDS wxUSE_SECRETSTORE)
wx_add_sample(shaped DATA star.png) wx_add_sample(shaped DATA star.png)
if(wxUSE_SOCKETS) if(wxUSE_SOCKETS)
wx_add_sample(sockets client.cpp NAME client LIBRARIES net FOLDER sockets) wx_add_sample(sockets client.cpp NAME client LIBRARIES wxnet FOLDER sockets)
wx_add_sample(sockets server.cpp NAME server LIBRARIES net FOLDER sockets) wx_add_sample(sockets server.cpp NAME server LIBRARIES wxnet FOLDER sockets)
wx_add_sample(sockets CONSOLE baseclient.cpp NAME baseclient LIBRARIES net FOLDER sockets) wx_add_sample(sockets CONSOLE baseclient.cpp NAME baseclient LIBRARIES wxnet FOLDER sockets)
wx_add_sample(sockets CONSOLE baseserver.cpp NAME baseserver LIBRARIES net FOLDER sockets) wx_add_sample(sockets CONSOLE baseserver.cpp NAME baseserver LIBRARIES wxnet FOLDER sockets)
endif() endif()
wx_add_sample(sound RES sound.rc DATA 9000g.wav cuckoo.wav doggrowl.wav tinkalink2.wav DEPENDS wxUSE_SOUND) wx_add_sample(sound RES sound.rc DATA 9000g.wav cuckoo.wav doggrowl.wav tinkalink2.wav DEPENDS wxUSE_SOUND)
wx_add_sample(splash DATA splash.png press.mpg DEPENDS wxUSE_SPLASH) wx_add_sample(splash DATA splash.png press.mpg DEPENDS wxUSE_SPLASH)
if(TARGET splash AND wxUSE_MEDIACTRL) if(TARGET splash AND wxUSE_MEDIACTRL)
wx_exe_link_libraries(splash media) wx_exe_link_libraries(splash wxmedia)
endif() endif()
wx_add_sample(splitter DEPENDS wxUSE_SPLITTER) wx_add_sample(splitter DEPENDS wxUSE_SPLITTER)
wx_add_sample(statbar DEPENDS wxUSE_STATUSBAR) wx_add_sample(statbar DEPENDS wxUSE_STATUSBAR)
wx_add_sample(stc stctest.cpp edit.cpp prefs.cpp edit.h defsext.h prefs.h wx_add_sample(stc stctest.cpp edit.cpp prefs.cpp edit.h defsext.h prefs.h
DATA stctest.cpp NAME stctest LIBRARIES stc DEPENDS wxUSE_STC) DATA stctest.cpp NAME stctest LIBRARIES wxstc DEPENDS wxUSE_STC)
wx_add_sample(svg svgtest.cpp RES svgtest.rc DEPENDS wxUSE_SVG) wx_add_sample(svg svgtest.cpp RES svgtest.rc DEPENDS wxUSE_SVG)
wx_add_sample(taborder) wx_add_sample(taborder)
wx_add_sample(taskbar tbtest.cpp tbtest.h DEPENDS wxUSE_TASKBARICON) wx_add_sample(taskbar tbtest.cpp tbtest.h DEPENDS wxUSE_TASKBARICON)
@@ -152,9 +152,9 @@ wx_add_sample(typetest typetest.cpp typetest.h)
wx_add_sample(uiaction DEPENDS wxUSE_UIACTIONSIMULATOR) wx_add_sample(uiaction DEPENDS wxUSE_UIACTIONSIMULATOR)
wx_add_sample(validate validate.cpp validate.h DEPENDS wxUSE_VALIDATORS) wx_add_sample(validate validate.cpp validate.h DEPENDS wxUSE_VALIDATORS)
wx_add_sample(vscroll vstest.cpp) wx_add_sample(vscroll vstest.cpp)
wx_add_sample(webview LIBRARIES webview NAME webviewsample DEPENDS wxUSE_WEBVIEW) wx_add_sample(webview LIBRARIES wxwebview NAME webviewsample DEPENDS wxUSE_WEBVIEW)
if(TARGET webviewsample AND wxUSE_STC) if(TARGET webviewsample AND wxUSE_STC)
wx_exe_link_libraries(webviewsample stc) wx_exe_link_libraries(webviewsample wxstc)
endif() endif()
# widgets Sample # widgets Sample
set(SAMPLE_WIDGETS_SRC set(SAMPLE_WIDGETS_SRC
@@ -244,12 +244,12 @@ wx_add_sample(xrc
custclas.h custclas.h
objrefdlg.h objrefdlg.h
DATA ${XRC_RC_FILES} DATA ${XRC_RC_FILES}
LIBRARIES aui ribbon xrc html LIBRARIES wxaui wxribbon wxxrc wxhtml
NAME xrcdemo NAME xrcdemo
DEPENDS wxUSE_XML wxUSE_XRC DEPENDS wxUSE_XML wxUSE_XRC
) )
wx_add_sample(xti xti.cpp classlist.cpp codereadercallback.cpp wx_add_sample(xti xti.cpp classlist.cpp codereadercallback.cpp
classlist.h codereadercallback.h LIBRARIES xml classlist.h codereadercallback.h LIBRARIES wxxml
DEPENDS wxUSE_XML wxUSE_EXTENDED_RTTI) DEPENDS wxUSE_XML wxUSE_EXTENDED_RTTI)
if(WIN32) if(WIN32)

View File

@@ -10,7 +10,7 @@
set(wxSAMPLE_FOLDER html) set(wxSAMPLE_FOLDER html)
set(wxSAMPLE_SUBDIR html/) set(wxSAMPLE_SUBDIR html/)
wx_add_sample(about DATA data/about.htm data/logo.png LIBRARIES html) wx_add_sample(about DATA data/about.htm data/logo.png LIBRARIES wxhtml)
wx_list_add_prefix(HELP_DATA_FILES helpfiles/ wx_list_add_prefix(HELP_DATA_FILES helpfiles/
Index.hhk Index.hhk
another.hhc another.hhc
@@ -23,21 +23,21 @@ wx_list_add_prefix(HELP_DATA_FILES helpfiles/
page2-b.htm page2-b.htm
testing.hhp testing.hhp
) )
wx_add_sample(help DATA ${HELP_DATA_FILES} LIBRARIES html NAME htmlhelp DEPENDS wxUSE_HELP) wx_add_sample(help DATA ${HELP_DATA_FILES} LIBRARIES wxhtml NAME htmlhelp DEPENDS wxUSE_HELP)
wx_add_sample(helpview DATA test.zip LIBRARIES html DEPENDS wxUSE_HELP) wx_add_sample(helpview DATA test.zip LIBRARIES wxhtml DEPENDS wxUSE_HELP)
#TODO: htmlctrl sample uses outdated definitions #TODO: htmlctrl sample uses outdated definitions
#wx_add_sample(htmlctrl LIBRARIES html) #wx_add_sample(htmlctrl LIBRARIES wxhtml)
wx_add_sample(printing DATA logo6.gif test.htm LIBRARIES html NAME htmlprinting wx_add_sample(printing DATA logo6.gif test.htm LIBRARIES wxhtml NAME htmlprinting
DEPENDS wxUSE_PRINTING_ARCHITECTURE) DEPENDS wxUSE_PRINTING_ARCHITECTURE)
wx_add_sample(test wx_add_sample(test
DATA DATA
imagemap.png pic.png pic2.bmp i18n.gif imagemap.png pic.png pic2.bmp i18n.gif
imagemap.htm tables.htm test.htm listtest.htm 8859_2.htm cp1250.htm imagemap.htm tables.htm test.htm listtest.htm 8859_2.htm cp1250.htm
regres.htm foo.png subsup.html regres.htm foo.png subsup.html
LIBRARIES net html NAME htmltest) LIBRARIES wxnet wxhtml NAME htmltest)
wx_add_sample(virtual DATA start.htm LIBRARIES html) wx_add_sample(virtual DATA start.htm LIBRARIES wxhtml)
wx_add_sample(widget DATA start.htm LIBRARIES html) wx_add_sample(widget DATA start.htm LIBRARIES wxhtml)
wx_add_sample(zip DATA pages.zip start.htm LIBRARIES html DEPENDS wxUSE_FS_ZIP) wx_add_sample(zip DATA pages.zip start.htm LIBRARIES wxhtml DEPENDS wxUSE_FS_ZIP)
set(wxSAMPLE_SUBDIR) set(wxSAMPLE_SUBDIR)
set(wxSAMPLE_FOLDER) set(wxSAMPLE_FOLDER)

View File

@@ -121,9 +121,9 @@ wx_add_test(test_base ${TEST_SRC}
) )
target_compile_definitions(test_base PRIVATE wxUSE_GUI=0 wxUSE_BASE=1) target_compile_definitions(test_base PRIVATE wxUSE_GUI=0 wxUSE_BASE=1)
if(wxUSE_SOCKETS) if(wxUSE_SOCKETS)
wx_exe_link_libraries(test_base net) wx_exe_link_libraries(test_base wxnet)
endif() endif()
if(wxUSE_XML) if(wxUSE_XML)
wx_exe_link_libraries(test_base xml) wx_exe_link_libraries(test_base wxxml)
endif() endif()
wx_test_enable_precomp(test_base) wx_test_enable_precomp(test_base)

View File

@@ -41,9 +41,9 @@ wx_add_test(test_drawing ${TEST_DRAWING_SRC}
DATA ${TEST_DRAWING_DATA} DATA ${TEST_DRAWING_DATA}
) )
if(wxUSE_SOCKETS) if(wxUSE_SOCKETS)
wx_exe_link_libraries(test_drawing net) wx_exe_link_libraries(test_drawing wxnet)
endif() endif()
wx_exe_link_libraries(test_drawing core) wx_exe_link_libraries(test_drawing wxcore)
wx_test_enable_precomp(test_drawing) wx_test_enable_precomp(test_drawing)
# This is a sample plugin, it simply uses a wxImage based # This is a sample plugin, it simply uses a wxImage based

View File

@@ -168,29 +168,29 @@ wx_add_test(test_gui ${TEST_GUI_SRC}
DATA ${TEST_GUI_DATA} DATA ${TEST_GUI_DATA}
RES ../samples/sample.rc RES ../samples/sample.rc
) )
wx_exe_link_libraries(test_gui core) wx_exe_link_libraries(test_gui wxcore)
if(wxUSE_RICHTEXT) if(wxUSE_RICHTEXT)
wx_exe_link_libraries(test_gui richtext) wx_exe_link_libraries(test_gui wxrichtext)
endif() endif()
if(wxUSE_STC) if(wxUSE_STC)
wx_exe_link_libraries(test_gui stc) wx_exe_link_libraries(test_gui wxstc)
endif() endif()
if(wxUSE_MEDIACTRL) if(wxUSE_MEDIACTRL)
wx_exe_link_libraries(test_gui media) wx_exe_link_libraries(test_gui wxmedia)
endif() endif()
if(wxUSE_XRC) if(wxUSE_XRC)
wx_exe_link_libraries(test_gui xrc) wx_exe_link_libraries(test_gui wxxrc)
endif() endif()
if(wxUSE_XML) if(wxUSE_XML)
wx_exe_link_libraries(test_gui xml) wx_exe_link_libraries(test_gui wxxml)
endif() endif()
if(wxUSE_HTML) if(wxUSE_HTML)
wx_exe_link_libraries(test_gui html) wx_exe_link_libraries(test_gui wxhtml)
endif() endif()
if(wxUSE_SOCKETS) if(wxUSE_SOCKETS)
wx_exe_link_libraries(test_gui net) wx_exe_link_libraries(test_gui wxnet)
endif() endif()
if(wxUSE_WEBVIEW) if(wxUSE_WEBVIEW)
wx_exe_link_libraries(test_gui webview) wx_exe_link_libraries(test_gui wxwebview)
endif() endif()
wx_test_enable_precomp(test_gui) wx_test_enable_precomp(test_gui)

View File

@@ -14,9 +14,9 @@ if(wxUSE_XRC)
target_compile_definitions(wxrc PRIVATE WXUSINGDLL) target_compile_definitions(wxrc PRIVATE WXUSINGDLL)
endif() endif()
if(wxUSE_XML) if(wxUSE_XML)
wx_exe_link_libraries(wxrc xml) wx_exe_link_libraries(wxrc wxxml)
endif() endif()
wx_exe_link_libraries(wxrc base) wx_exe_link_libraries(wxrc wxbase)
set_target_properties(wxrc PROPERTIES FOLDER "Utilities") set_target_properties(wxrc PROPERTIES FOLDER "Utilities")