Merge branch 'master' into web-request
Merge with the latest master in preparation for merging into master. Rebake to resolve conflicts in generated files.
This commit is contained in:
@@ -29,11 +29,21 @@ endmacro()
|
||||
|
||||
macro(wx_get_dependencies var lib)
|
||||
set(${var})
|
||||
if(TARGET ${lib})
|
||||
get_target_property(deps ${lib} LINK_LIBRARIES)
|
||||
if(TARGET wx${lib})
|
||||
get_target_property(deps wx${lib} LINK_LIBRARIES)
|
||||
foreach(dep IN LISTS deps)
|
||||
get_filename_component(name ${dep} NAME)
|
||||
wx_string_append(${var} "${name} ")
|
||||
if(TARGET ${dep})
|
||||
get_target_property(dep_type ${dep} TYPE)
|
||||
if (dep_type STREQUAL "INTERFACE_LIBRARY")
|
||||
get_target_property(dep_name ${dep} INTERFACE_OUTPUT_NAME)
|
||||
else()
|
||||
get_target_property(dep_name ${dep} OUTPUT_NAME)
|
||||
endif()
|
||||
set(dep_name "-l${dep_name}")
|
||||
else()
|
||||
get_filename_component(dep_name ${dep} NAME)
|
||||
endif()
|
||||
wx_string_append(${var} "${dep_name} ")
|
||||
endforeach()
|
||||
string(STRIP ${${var}} ${var})
|
||||
endif()
|
||||
@@ -80,7 +90,7 @@ function(wx_write_config)
|
||||
set(WX_CHARTYPE ansi)
|
||||
set(lib_unicode_suffix)
|
||||
endif()
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
if(CMAKE_CROSSCOMPILING AND NOT IPHONE)
|
||||
set(cross_compiling yes)
|
||||
set(host_alias ${CMAKE_SYSTEM_NAME})
|
||||
else()
|
||||
@@ -93,7 +103,8 @@ function(wx_write_config)
|
||||
set(STD_BASE_LIBS_ALL xml net base)
|
||||
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)
|
||||
if(TARGET ${lib})
|
||||
list(FIND wxLIB_TARGETS wx${lib} hasLib)
|
||||
if (hasLib GREATER -1)
|
||||
wx_string_append(BUILT_WX_LIBS "${lib} ")
|
||||
list(FIND STD_BASE_LIBS_ALL ${lib} index)
|
||||
if (index GREATER -1)
|
||||
@@ -105,9 +116,9 @@ function(wx_write_config)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
string(STRIP ${BUILT_WX_LIBS} BUILT_WX_LIBS)
|
||||
string(STRIP ${STD_BASE_LIBS} STD_BASE_LIBS)
|
||||
string(STRIP ${STD_GUI_LIBS} STD_GUI_LIBS)
|
||||
string(STRIP "${BUILT_WX_LIBS}" BUILT_WX_LIBS)
|
||||
string(STRIP "${STD_BASE_LIBS}" STD_BASE_LIBS)
|
||||
string(STRIP "${STD_GUI_LIBS}" STD_GUI_LIBS)
|
||||
|
||||
set(WX_RELEASE ${wxMAJOR_VERSION}.${wxMINOR_VERSION})
|
||||
set(WX_VERSION ${wxVERSION})
|
||||
@@ -130,6 +141,9 @@ function(wx_write_config)
|
||||
wx_get_dependencies(EXTRALIBS_MEDIA media)
|
||||
wx_get_dependencies(OPENGL_LIBS gl)
|
||||
set(DMALLOC_LIBS)
|
||||
if(wxBUILD_MONOLITHIC)
|
||||
wx_get_dependencies(WXCONFIG_LIBS mono)
|
||||
endif()
|
||||
|
||||
set(CC ${CMAKE_C_COMPILER})
|
||||
set(CXX ${CMAKE_CXX_COMPILER})
|
||||
|
@@ -18,7 +18,28 @@ function(wx_add_demo name)
|
||||
if(WIN32)
|
||||
list(APPEND src_files ${wxSOURCE_DIR}/demos/${name}/${DEMO_NAME}.rc)
|
||||
endif()
|
||||
|
||||
if (WXMSW AND DEFINED wxUSE_DPI_AWARE_MANIFEST)
|
||||
set(wxDPI_MANIFEST_PRFIX "wx")
|
||||
if (wxARCH_SUFFIX)
|
||||
set(wxDPI_MANIFEST_PRFIX "amd64")
|
||||
endif()
|
||||
set(wxUSE_DPI_AWARE_MANIFEST_VALUE 0)
|
||||
if (${wxUSE_DPI_AWARE_MANIFEST} MATCHES "system")
|
||||
set(wxUSE_DPI_AWARE_MANIFEST_VALUE 1)
|
||||
list(APPEND src_files "${wxSOURCE_DIR}/include/wx/msw/${wxDPI_MANIFEST_PRFIX}_dpi_aware.manifest")
|
||||
elseif(${wxUSE_DPI_AWARE_MANIFEST} MATCHES "per-monitor")
|
||||
set(wxUSE_DPI_AWARE_MANIFEST_VALUE 2)
|
||||
list(APPEND src_files "${wxSOURCE_DIR}/include/wx/msw/${wxDPI_MANIFEST_PRFIX}_dpi_aware_pmv2.manifest")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_executable(${DEMO_NAME} WIN32 MACOSX_BUNDLE ${src_files})
|
||||
|
||||
if (DEFINED wxUSE_DPI_AWARE_MANIFEST_VALUE)
|
||||
target_compile_definitions(${DEMO_NAME} PRIVATE wxUSE_DPI_AWARE_MANIFEST=${wxUSE_DPI_AWARE_MANIFEST_VALUE})
|
||||
endif()
|
||||
|
||||
if(DEMO_DATA)
|
||||
# TODO: unify with data handling for samples
|
||||
# TODO: handle data files differently for OS X bundles
|
||||
@@ -35,7 +56,7 @@ function(wx_add_demo name)
|
||||
if(wxBUILD_SHARED)
|
||||
target_compile_definitions(${DEMO_NAME} PRIVATE WXUSINGDLL)
|
||||
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})
|
||||
set_target_properties(${DEMO_NAME} PROPERTIES FOLDER "Demos")
|
||||
set_target_properties(${DEMO_NAME} PROPERTIES
|
||||
@@ -71,7 +92,7 @@ wx_add_demo(forty
|
||||
DATA
|
||||
about.htm
|
||||
LIBRARIES
|
||||
html xml
|
||||
wxhtml wxxml
|
||||
)
|
||||
|
||||
wx_add_demo(fractal
|
||||
@@ -97,7 +118,7 @@ wx_add_demo(poem
|
||||
DATA
|
||||
wxpoem.txt wxpoem.dat wxpoem.idx
|
||||
LIBRARIES
|
||||
html
|
||||
wxhtml
|
||||
NAME
|
||||
wxpoem
|
||||
)
|
||||
|
@@ -113,7 +113,6 @@ set(BASE_COREFOUNDATION_SRC
|
||||
src/osx/core/evtloop_cf.cpp
|
||||
src/osx/core/secretstore.cpp
|
||||
src/osx/core/strconv_cf.cpp
|
||||
src/osx/core/utilsexc_base.cpp
|
||||
src/osx/cocoa/utils_base.mm
|
||||
)
|
||||
|
||||
@@ -130,6 +129,9 @@ set(BASE_COREFOUNDATION_HDR
|
||||
wx/osx/core/cfdictionary.h
|
||||
wx/osx/core/cfarray.h
|
||||
wx/osx/core/cftype.h
|
||||
wx/osx/core/joystick.h
|
||||
wx/osx/core/mimetype.h
|
||||
wx/osx/core/dataview.h
|
||||
)
|
||||
|
||||
set(BASE_OSX_SHARED_SRC
|
||||
@@ -151,10 +153,6 @@ set(BASE_AND_GUI_OSX_COCOA_SRC
|
||||
src/osx/cocoa/power.mm
|
||||
)
|
||||
|
||||
set(BASE_AND_GUI_OSX_IPHONE_SRC
|
||||
src/osx/iphone/utils.mm
|
||||
)
|
||||
|
||||
set(BASE_OSX_NOTWXMAC_SRC
|
||||
${BASE_UNIX_AND_DARWIN_NOTWXMAC_SRC}
|
||||
${BASE_COREFOUNDATION_SRC}
|
||||
@@ -175,6 +173,7 @@ set(QT_WIN32_SRC
|
||||
src/msw/dialup.cpp
|
||||
src/msw/dib.cpp
|
||||
src/msw/joystick.cpp
|
||||
src/qt/graphics.cpp
|
||||
)
|
||||
|
||||
set(QT_WIN32_HDR
|
||||
@@ -269,12 +268,12 @@ set(QT_HDR
|
||||
wx/qt/window.h
|
||||
wx/qt/dvrenderer.h
|
||||
wx/qt/dvrenderers.h
|
||||
wx/generic/animate.h
|
||||
wx/qt/calctrl.h
|
||||
wx/qt/taskbar.h
|
||||
wx/qt/dataview.h
|
||||
wx/generic/activityindicator.h
|
||||
${QT_PLATFORM_HDR}
|
||||
wx/qt/treectrl.h
|
||||
)
|
||||
|
||||
set(QT_SRC
|
||||
@@ -368,11 +367,11 @@ set(QT_SRC
|
||||
src/qt/dvrenderer.cpp
|
||||
src/generic/activityindicator.cpp
|
||||
src/common/taskbarcmn.cpp
|
||||
src/generic/animateg.cpp
|
||||
src/qt/calctrl.cpp
|
||||
src/qt/dataview.cpp
|
||||
src/qt/taskbar.cpp
|
||||
${QT_PLATFORM_SRC}
|
||||
src/qt/treectrl.cpp
|
||||
)
|
||||
|
||||
set(MEDIA_QT_SRC
|
||||
@@ -920,6 +919,8 @@ set(GUI_CMN_SRC
|
||||
src/generic/editlbox.cpp
|
||||
src/generic/datavgen.cpp
|
||||
src/generic/creddlgg.cpp
|
||||
src/generic/rowheightcache.cpp
|
||||
src/generic/animateg.cpp
|
||||
)
|
||||
|
||||
set(GUI_CMN_HDR
|
||||
@@ -1210,6 +1211,7 @@ set(GUI_CMN_HDR
|
||||
wx/generic/sashwin.h
|
||||
wx/creddlg.h
|
||||
wx/generic/creddlgg.h
|
||||
wx/generic/animate.h
|
||||
)
|
||||
|
||||
set(UNIX_SRC
|
||||
@@ -1293,6 +1295,7 @@ set(GTK_LOWLEVEL_SRC
|
||||
src/gtk/filectrl.cpp
|
||||
src/gtk/filehistory.cpp
|
||||
src/gtk/font.cpp
|
||||
src/gtk/image_gtk.cpp
|
||||
src/gtk/sockgtk.cpp
|
||||
src/gtk/mimetype.cpp
|
||||
src/gtk/minifram.cpp
|
||||
@@ -1414,6 +1417,7 @@ set(GTK_SRC
|
||||
src/gtk/animate.cpp
|
||||
src/gtk/bmpcbox.cpp
|
||||
src/gtk/hyperlink.cpp
|
||||
src/gtk/srchctrl.cpp
|
||||
)
|
||||
|
||||
set(GTK2_SRC
|
||||
@@ -1485,6 +1489,7 @@ set(GTK_HDR
|
||||
wx/gtk/taskbar.h
|
||||
wx/gtk/activityindicator.h
|
||||
wx/gtk/hyperlink.h
|
||||
wx/gtk/srchctrl.h
|
||||
)
|
||||
|
||||
set(GTK2_HDR
|
||||
@@ -1605,7 +1610,6 @@ set(GTK1_SRC
|
||||
src/gtk1/toolbar.cpp
|
||||
src/gtk1/textctrl.cpp
|
||||
src/gtk1/tglbtn.cpp
|
||||
src/generic/animateg.cpp
|
||||
src/gtk1/eggtrayicon.c
|
||||
src/generic/activityindicator.cpp
|
||||
src/gtk1/taskbar.cpp
|
||||
@@ -1658,7 +1662,6 @@ set(GTK1_HDR
|
||||
wx/gtk1/tglbtn.h
|
||||
wx/gtk1/treectrl.h
|
||||
wx/generic/activityindicator.h
|
||||
wx/generic/animate.h
|
||||
)
|
||||
|
||||
set(MOTIF_LOWLEVEL_SRC
|
||||
@@ -1751,7 +1754,6 @@ set(MOTIF_SRC
|
||||
src/generic/statline.cpp
|
||||
src/generic/statusbr.cpp
|
||||
src/generic/tabg.cpp
|
||||
src/generic/animateg.cpp
|
||||
src/generic/activityindicator.cpp
|
||||
)
|
||||
|
||||
@@ -1824,8 +1826,6 @@ set(MOTIF_HDR
|
||||
wx/motif/toolbar.h
|
||||
wx/motif/toplevel.h
|
||||
wx/motif/window.h
|
||||
wx/generic/animateanimate.h
|
||||
wx/generic/animate.h
|
||||
)
|
||||
|
||||
set(X11_LOWLEVEL_SRC
|
||||
@@ -1963,6 +1963,7 @@ set(MSW_LOWLEVEL_SRC
|
||||
src/msw/taskbar.cpp
|
||||
src/msw/richtooltip.cpp
|
||||
src/msw/evtloop.cpp
|
||||
src/msw/ole/access.cpp
|
||||
)
|
||||
|
||||
set(MSW_LOWLEVEL_HDR
|
||||
@@ -2029,7 +2030,6 @@ set(MSW_SRC
|
||||
src/msw/nativdlg.cpp
|
||||
src/msw/nativewin.cpp
|
||||
src/msw/notebook.cpp
|
||||
src/msw/ole/access.cpp
|
||||
src/msw/ownerdrw.cpp
|
||||
src/msw/progdlg.cpp
|
||||
src/msw/radiobox.cpp
|
||||
@@ -2053,7 +2053,6 @@ set(MSW_SRC
|
||||
src/msw/treectrl.cpp
|
||||
src/msw/bmpcbox.cpp
|
||||
src/msw/datectrl.cpp
|
||||
src/generic/animateg.cpp
|
||||
src/msw/calctrl.cpp
|
||||
src/msw/datecontrols.cpp
|
||||
src/msw/timectrl.cpp
|
||||
@@ -2167,7 +2166,6 @@ set(MSW_HDR
|
||||
wx/msw/hyperlink.h
|
||||
wx/msw/datetimectrl.h
|
||||
wx/msw/timectrl.h
|
||||
wx/generic/animate.h
|
||||
wx/generic/activityindicator.h
|
||||
)
|
||||
|
||||
@@ -2249,7 +2247,6 @@ set(DFB_LOWLEVEL_SRC
|
||||
src/dfb/utils.cpp
|
||||
src/dfb/window.cpp
|
||||
src/dfb/wrapdfb.cpp
|
||||
src/generic/animateg.cpp
|
||||
)
|
||||
|
||||
set(DFB_LOWLEVEL_HDR
|
||||
@@ -2278,7 +2275,6 @@ set(DFB_LOWLEVEL_HDR
|
||||
wx/dfb/toplevel.h
|
||||
wx/dfb/window.h
|
||||
wx/dfb/wrapdfb.h
|
||||
wx/generic/animate.h
|
||||
)
|
||||
|
||||
set(OSX_LOWLEVEL_SRC
|
||||
@@ -2429,7 +2425,6 @@ set(OSX_SHARED_HDR
|
||||
wx/osx/frame.h
|
||||
wx/osx/gauge.h
|
||||
wx/osx/listbox.h
|
||||
wx/osx/listctrl.h
|
||||
wx/osx/mdi.h
|
||||
wx/osx/menu.h
|
||||
wx/osx/menuitem.h
|
||||
@@ -2534,7 +2529,6 @@ set(OSX_COCOA_SRC
|
||||
src/osx/cocoa/dataview.mm
|
||||
src/osx/carbon/sound.cpp
|
||||
src/osx/cocoa/taskbar.mm
|
||||
src/generic/animateg.cpp
|
||||
src/common/taskbarcmn.cpp
|
||||
src/osx/dataview_osx.cpp
|
||||
src/osx/cocoa/notifmsg.mm
|
||||
@@ -2561,8 +2555,6 @@ set(OSX_COCOA_HDR
|
||||
wx/osx/datetimectrl.h
|
||||
wx/osx/taskbarosx.h
|
||||
wx/osx/dvrenderers.h
|
||||
wx/generic/animate.h
|
||||
wx/osx/core/joystick.h
|
||||
)
|
||||
|
||||
set(OSX_IPHONE_SRC
|
||||
@@ -2586,17 +2578,16 @@ set(OSX_IPHONE_SRC
|
||||
src/osx/iphone/utils.mm
|
||||
src/osx/iphone/window.mm
|
||||
src/osx/sound_osx.cpp
|
||||
src/generic/animateg.cpp
|
||||
src/osx/core/sound.cpp
|
||||
src/osx/iphone/statbmp.mm
|
||||
src/osx/iphone/menuitem.mm
|
||||
src/osx/iphone/menu.mm
|
||||
)
|
||||
|
||||
set(OSX_IPHONE_HDR
|
||||
wx/osx/iphone/chkconf.h
|
||||
wx/osx/iphone/evtloop.h
|
||||
wx/osx/iphone/private.h
|
||||
wx/generic/region.h
|
||||
wx/generic/animate.h
|
||||
wx/osx/sound.h
|
||||
)
|
||||
|
||||
@@ -2608,7 +2599,6 @@ set(UNIV_THEMES_SRC
|
||||
)
|
||||
|
||||
set(UNIV_SRC
|
||||
${UNIV_PLATFORM_SRC}
|
||||
src/generic/accel.cpp
|
||||
src/generic/clrpickerg.cpp
|
||||
src/generic/collpaneg.cpp
|
||||
@@ -2663,9 +2653,7 @@ set(UNIV_SRC
|
||||
)
|
||||
|
||||
set(UNIV_HDR
|
||||
${UNIV_PLATFORM_HDR}
|
||||
wx/generic/accel.h
|
||||
wx/generic/animate.h
|
||||
wx/generic/clrpickerg.h
|
||||
wx/generic/collpaneg.h
|
||||
wx/generic/ctrlsub.h
|
||||
@@ -2845,6 +2833,7 @@ set(HTML_CMN_HDR
|
||||
|
||||
set(WEBVIEW_MSW_SRC
|
||||
src/msw/webview_ie.cpp
|
||||
src/msw/webview_edge.cpp
|
||||
)
|
||||
|
||||
set(WEBVIEW_CMN_SRC
|
||||
@@ -2856,7 +2845,7 @@ set(WEBVIEW_CMN_SRC
|
||||
set(WEBVIEW_MSW_HDR
|
||||
wx/msw/webviewhistoryitem_ie.h
|
||||
wx/msw/webview_ie.h
|
||||
wx/msw/webview_missing.h
|
||||
wx/msw/webview_edge.h
|
||||
)
|
||||
|
||||
set(WEBVIEW_CMN_HDR
|
||||
@@ -2922,6 +2911,7 @@ set(XRC_SRC
|
||||
src/xrc/xh_grid.cpp
|
||||
src/xrc/xh_html.cpp
|
||||
src/xrc/xh_hyperlink.cpp
|
||||
src/xrc/xh_infobar.cpp
|
||||
src/xrc/xh_listb.cpp
|
||||
src/xrc/xh_listbk.cpp
|
||||
src/xrc/xh_listc.cpp
|
||||
@@ -2957,8 +2947,8 @@ set(XRC_SRC
|
||||
src/xrc/xh_unkwn.cpp
|
||||
src/xrc/xh_wizrd.cpp
|
||||
src/xrc/xmlres.cpp
|
||||
src/xrc/xmladv.cpp
|
||||
src/xrc/xmlrsall.cpp
|
||||
src/xrc/xh_dataview.cpp
|
||||
)
|
||||
|
||||
set(XRC_HDR
|
||||
@@ -2994,6 +2984,7 @@ set(XRC_HDR
|
||||
wx/xrc/xh_grid.h
|
||||
wx/xrc/xh_html.h
|
||||
wx/xrc/xh_hyperlink.h
|
||||
wx/xrc/xh_infobar.h
|
||||
wx/xrc/xh_listb.h
|
||||
wx/xrc/xh_listbk.h
|
||||
wx/xrc/xh_listc.h
|
||||
@@ -3028,6 +3019,7 @@ set(XRC_HDR
|
||||
wx/xrc/xh_unkwn.h
|
||||
wx/xrc/xh_wizrd.h
|
||||
wx/xrc/xmlres.h
|
||||
wx/xrc/xh_dataview.h
|
||||
)
|
||||
|
||||
set(XML_SRC
|
||||
@@ -3059,18 +3051,25 @@ set(OPENGL_MSW_HDR
|
||||
set(OPENGL_GTK_SRC
|
||||
src/gtk/glcanvas.cpp
|
||||
src/unix/glx11.cpp
|
||||
src/unix/glegl.cpp
|
||||
)
|
||||
|
||||
set(OPENGL_GTK_HDR
|
||||
wx/gtk/glcanvas.h
|
||||
wx/unix/glx11.h
|
||||
wx/unix/glegl.h
|
||||
)
|
||||
|
||||
set(OPENGL_OSX_SHARED_SRC
|
||||
set(OPENGL_OSX_COCOA_SRC
|
||||
src/osx/cocoa/glcanvas.mm
|
||||
src/osx/glcanvas_osx.cpp
|
||||
)
|
||||
|
||||
set(OPENGL_OSX_IPHONE_SRC
|
||||
src/osx/iphone/glcanvas.mm
|
||||
src/osx/glcanvas_osx.cpp
|
||||
)
|
||||
|
||||
set(UNIX_SOUND_SDL_SRC
|
||||
src/unix/sound_sdl.cpp
|
||||
)
|
||||
@@ -3208,13 +3207,20 @@ set(RICHTEXT_HDR
|
||||
wx/xrc/xh_richtext.h
|
||||
)
|
||||
|
||||
set(STC_SRC
|
||||
set(STC_CMN_SRC
|
||||
src/stc/stc.cpp
|
||||
src/stc/PlatWX.cpp
|
||||
src/stc/ScintillaWX.cpp
|
||||
)
|
||||
|
||||
set(STC_HDR
|
||||
set(STC_CMN_HDR
|
||||
wx/stc/stc.h
|
||||
)
|
||||
|
||||
set(STC_OSX_COCOA_SRC
|
||||
src/stc/PlatWXcocoa.mm
|
||||
)
|
||||
|
||||
set(STC_OSX_COCOA_HDR
|
||||
)
|
||||
|
||||
|
@@ -77,50 +77,59 @@ endmacro()
|
||||
function(wx_set_common_target_properties target_name)
|
||||
cmake_parse_arguments(wxCOMMON_TARGET_PROPS "DEFAULT_WARNINGS" "" "" ${ARGN})
|
||||
|
||||
if(DEFINED wxBUILD_CXX_STANDARD AND NOT wxBUILD_CXX_STANDARD STREQUAL COMPILER_DEFAULT)
|
||||
# TODO: implement for older CMake versions ?
|
||||
set_target_properties(${target_name} PROPERTIES CXX_STANDARD ${wxBUILD_CXX_STANDARD})
|
||||
if(
|
||||
APPLE AND
|
||||
CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9 AND
|
||||
(wxBUILD_CXX_STANDARD EQUAL 11 OR wxBUILD_CXX_STANDARD EQUAL 14)
|
||||
)
|
||||
if(CMAKE_GENERATOR STREQUAL "Xcode")
|
||||
set_target_properties(${target_name} PROPERTIES XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY libc++)
|
||||
else()
|
||||
target_compile_options(${target_name} PUBLIC "-stdlib=libc++")
|
||||
target_link_libraries(${target_name} PRIVATE "-stdlib=libc++")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
set_target_properties(${target_name} PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${wxPLATFORM_LIB_DIR}"
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${wxPLATFORM_LIB_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${wxPLATFORM_LIB_DIR}"
|
||||
)
|
||||
if(NOT wxCOMMON_TARGET_PROPS_DEFAULT_WARNINGS)
|
||||
# Enable higher warnings for most compilers/IDEs
|
||||
if(MSVC)
|
||||
target_compile_options(${target_name} PRIVATE /W4)
|
||||
endif()
|
||||
# TODO: add warning flags for other compilers
|
||||
|
||||
if(wxBUILD_PIC)
|
||||
set_target_properties(${target_name} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
if(wxCOMMON_TARGET_PROPS_DEFAULT_WARNINGS)
|
||||
set(MSVC_WARNING_LEVEL "/W3")
|
||||
else()
|
||||
set(MSVC_WARNING_LEVEL "/W4")
|
||||
endif()
|
||||
target_compile_options(${target_name} PRIVATE ${MSVC_WARNING_LEVEL})
|
||||
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND NOT wxCOMMON_TARGET_PROPS_DEFAULT_WARNINGS)
|
||||
target_compile_options(${target_name} PRIVATE
|
||||
-Wall
|
||||
)
|
||||
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND NOT wxCOMMON_TARGET_PROPS_DEFAULT_WARNINGS)
|
||||
target_compile_options(${target_name} PRIVATE
|
||||
-Wall
|
||||
-Wno-ignored-attributes
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CMAKE_USE_PTHREADS_INIT)
|
||||
target_compile_options(${target_name} PRIVATE "-pthread")
|
||||
set_target_properties(${target_name} PROPERTIES LINK_FLAGS "-pthread")
|
||||
# clang++.exe: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
|
||||
if(NOT (WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
|
||||
set_target_properties(${target_name} PROPERTIES LINK_FLAGS "-pthread")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Set common properties on wx library target
|
||||
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:
|
||||
# docs/contrib/about-platform-toolkit-and-library-names.md
|
||||
# docs/contributing/about-platform-toolkit-and-library-names.md
|
||||
if(is_base)
|
||||
set(lib_toolkit base)
|
||||
else()
|
||||
set(lib_toolkit ${wxBUILD_TOOLKIT}${wxBUILD_WIDGETSET})
|
||||
endif()
|
||||
if(WIN32)
|
||||
if(MSVC)
|
||||
set(lib_version ${wxMAJOR_VERSION}${wxMINOR_VERSION})
|
||||
else()
|
||||
set(lib_version ${wxMAJOR_VERSION}.${wxMINOR_VERSION})
|
||||
@@ -130,51 +139,64 @@ function(wx_set_target_properties target_name is_base)
|
||||
else()
|
||||
set(lib_unicode)
|
||||
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
|
||||
set(lib_suffix _${target_name})
|
||||
set(lib_suffix _${target_name_short})
|
||||
else()
|
||||
set(lib_suffix)
|
||||
endif()
|
||||
set(lib_flavour "")
|
||||
if(wxBUILD_FLAVOUR)
|
||||
set(lib_flavour "_${wxBUILD_FLAVOUR}")
|
||||
string(REPLACE "-" "_" lib_flavour ${lib_flavour})
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(MSVC)
|
||||
# match visual studio name
|
||||
set_target_properties(${target_name}
|
||||
PROPERTIES
|
||||
OUTPUT_NAME "wx${lib_toolkit}${lib_version}${lib_unicode}${lib_flavour}${lib_suffix}"
|
||||
OUTPUT_NAME_DEBUG "wx${lib_toolkit}${lib_version}${lib_unicode}d${lib_flavour}${lib_suffix}"
|
||||
PREFIX ""
|
||||
)
|
||||
else()
|
||||
# match configure name (mingw, cygwin)
|
||||
set_target_properties(${target_name}
|
||||
PROPERTIES
|
||||
OUTPUT_NAME "wx_${lib_toolkit}${lib_unicode}${lib_flavour}${lib_suffix}-${lib_version}"
|
||||
OUTPUT_NAME_DEBUG "wx_${lib_toolkit}${lib_unicode}d${lib_flavour}${lib_suffix}-${lib_version}"
|
||||
PREFIX "lib"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(wxBUILD_SHARED)
|
||||
# Add compiler type and or vendor
|
||||
set(dll_suffix "_${wxCOMPILER_PREFIX}${wxARCH_SUFFIX}")
|
||||
set(dll_suffix "${lib_flavour}${lib_suffix}_${wxCOMPILER_PREFIX}")
|
||||
if(wxBUILD_VENDOR)
|
||||
wx_string_append(dll_suffix "_${wxBUILD_VENDOR}")
|
||||
endif()
|
||||
|
||||
set(dll_version ${lib_version})
|
||||
set(dll_version ${wxMAJOR_VERSION}${wxMINOR_VERSION})
|
||||
if(wxVERSION_IS_DEV)
|
||||
wx_string_append(dll_version ${wxRELEASE_NUMBER})
|
||||
endif()
|
||||
set_target_properties(${target_name}
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_NAME wx${lib_toolkit}${dll_version}${lib_unicode}${lib_suffix}${dll_suffix}
|
||||
RUNTIME_OUTPUT_NAME_DEBUG wx${lib_toolkit}${dll_version}${lib_unicode}d${lib_suffix}${dll_suffix})
|
||||
if(MINGW)
|
||||
# Modify MinGW output to match other build systems
|
||||
set_target_properties(${target_name}
|
||||
PROPERTIES
|
||||
PREFIX ""
|
||||
IMPORT_SUFFIX .a
|
||||
)
|
||||
endif()
|
||||
RUNTIME_OUTPUT_NAME "wx${lib_toolkit}${dll_version}${lib_unicode}${dll_suffix}"
|
||||
RUNTIME_OUTPUT_NAME_DEBUG "wx${lib_toolkit}${dll_version}${lib_unicode}d${dll_suffix}"
|
||||
PREFIX ""
|
||||
)
|
||||
target_compile_definitions(${target_name} PRIVATE
|
||||
"-DWXDLLNAME=wx${lib_toolkit}${dll_version}${lib_unicode}$<$<CONFIG:Debug>:d>${lib_suffix}${dll_suffix}")
|
||||
"-DWXDLLNAME=wx${lib_toolkit}${dll_version}${lib_unicode}$<$<CONFIG:Debug>:d>${dll_suffix}")
|
||||
endif()
|
||||
|
||||
set_target_properties(${target_name}
|
||||
PROPERTIES
|
||||
OUTPUT_NAME wx${lib_toolkit}${lib_version}${lib_unicode}${lib_suffix}
|
||||
OUTPUT_NAME_DEBUG wx${lib_toolkit}${lib_version}${lib_unicode}d${lib_suffix}
|
||||
PREFIX ""
|
||||
)
|
||||
else()
|
||||
set_target_properties(${target_name}
|
||||
PROPERTIES
|
||||
OUTPUT_NAME wx_${lib_toolkit}${lib_unicode}${lib_suffix}-${lib_version}
|
||||
OUTPUT_NAME_DEBUG wx_${lib_toolkit}${lib_unicode}d${lib_suffix}-${lib_version}
|
||||
OUTPUT_NAME wx_${lib_toolkit}${lib_unicode}${lib_flavour}${lib_suffix}-${lib_version}
|
||||
# NOTE: wx-config can not be used to connect the libraries with the debug suffix.
|
||||
#OUTPUT_NAME_DEBUG wx_${lib_toolkit}${lib_unicode}d${lib_flavour}${lib_suffix}-${lib_version}
|
||||
OUTPUT_NAME_DEBUG wx_${lib_toolkit}${lib_unicode}${lib_flavour}${lib_suffix}-${lib_version}
|
||||
)
|
||||
endif()
|
||||
if(CYGWIN)
|
||||
@@ -183,7 +205,7 @@ function(wx_set_target_properties target_name is_base)
|
||||
|
||||
# Set common compile definitions
|
||||
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)
|
||||
elseif(is_base OR NOT wxUSE_GUI)
|
||||
target_compile_definitions(${target_name} PRIVATE wxUSE_GUI=0 wxUSE_BASE=1)
|
||||
@@ -254,26 +276,26 @@ function(wx_set_target_properties target_name is_base)
|
||||
PUBLIC ${wxTOOLKIT_DEFINITIONS})
|
||||
|
||||
if(wxBUILD_SHARED)
|
||||
string(TOUPPER ${target_name} target_name_upper)
|
||||
if(target_name STREQUAL "mono")
|
||||
string(TOUPPER ${target_name_short} target_name_upper)
|
||||
if(target_name_short STREQUAL "mono")
|
||||
target_compile_definitions(${target_name} PRIVATE DLL_EXPORTS WXMAKINGDLL)
|
||||
else()
|
||||
target_compile_definitions(${target_name} PRIVATE DLL_EXPORTS WXMAKINGDLL_${target_name_upper})
|
||||
endif()
|
||||
if(NOT target_name STREQUAL "base")
|
||||
if(NOT target_name_short STREQUAL "base")
|
||||
target_compile_definitions(${target_name} PRIVATE WXUSINGDLL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Link common libraries
|
||||
if(NOT target_name STREQUAL "mono")
|
||||
if(NOT target_name STREQUAL "base")
|
||||
if(NOT target_name_short STREQUAL "mono")
|
||||
if(NOT target_name_short STREQUAL "base")
|
||||
# All libraries except base need the base library
|
||||
target_link_libraries(${target_name} PUBLIC base)
|
||||
target_link_libraries(${target_name} PUBLIC wxbase)
|
||||
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
|
||||
target_link_libraries(${target_name} PUBLIC core)
|
||||
target_link_libraries(${target_name} PUBLIC wxcore)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -282,6 +304,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
|
||||
@@ -291,7 +316,10 @@ macro(wx_add_library name)
|
||||
cmake_parse_arguments(wxADD_LIBRARY "IS_BASE" "" "" ${ARGN})
|
||||
set(src_files ${wxADD_LIBRARY_UNPARSED_ARGUMENTS})
|
||||
|
||||
if(wxBUILD_MONOLITHIC AND NOT ${name} STREQUAL "mono")
|
||||
list(APPEND wxLIB_TARGETS ${name})
|
||||
set(wxLIB_TARGETS ${wxLIB_TARGETS} PARENT_SCOPE)
|
||||
|
||||
if(wxBUILD_MONOLITHIC AND NOT ${name} STREQUAL "wxmono")
|
||||
# collect all source files for mono library
|
||||
set(wxMONO_SRC_FILES ${wxMONO_SRC_FILES} ${src_files} PARENT_SCOPE)
|
||||
else()
|
||||
@@ -307,8 +335,16 @@ macro(wx_add_library name)
|
||||
set(wxBUILD_LIB_TYPE STATIC)
|
||||
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(wx::${name_short} ALIAS ${name})
|
||||
wx_set_target_properties(${name} ${wxADD_LIBRARY_IS_BASE})
|
||||
set_target_properties(${name} PROPERTIES PROJECT_LABEL ${name_short})
|
||||
|
||||
# Setup install
|
||||
wx_install(TARGETS ${name}
|
||||
@@ -379,7 +415,7 @@ endmacro()
|
||||
# Link wx libraries to executable
|
||||
macro(wx_exe_link_libraries name)
|
||||
if(wxBUILD_MONOLITHIC)
|
||||
target_link_libraries(${name} PUBLIC mono)
|
||||
target_link_libraries(${name} PUBLIC wxmono)
|
||||
else()
|
||||
target_link_libraries(${name};PRIVATE;${ARGN})
|
||||
endif()
|
||||
@@ -389,14 +425,18 @@ endmacro()
|
||||
# Forwards everything to target_include_directories() except for monolithic
|
||||
# build where it collects all include paths for linking with the mono lib
|
||||
macro(wx_lib_include_directories name)
|
||||
cmake_parse_arguments(_LIB_INCLUDE_DIRS "" "" "PUBLIC;PRIVATE" ${ARGN})
|
||||
if(wxBUILD_MONOLITHIC)
|
||||
cmake_parse_arguments(_LIB_INCLUDE_DIRS "" "" "PUBLIC;PRIVATE" ${ARGN})
|
||||
list(APPEND wxMONO_INCLUDE_DIRS_PUBLIC ${_LIB_INCLUDE_DIRS_PUBLIC})
|
||||
list(APPEND wxMONO_INCLUDE_DIRS_PRIVATE ${_LIB_INCLUDE_DIRS_PRIVATE})
|
||||
set(wxMONO_INCLUDE_DIRS_PUBLIC ${wxMONO_INCLUDE_DIRS_PUBLIC} PARENT_SCOPE)
|
||||
set(wxMONO_INCLUDE_DIRS_PRIVATE ${wxMONO_INCLUDE_DIRS_PRIVATE} PARENT_SCOPE)
|
||||
else()
|
||||
target_include_directories(${name};BEFORE;${ARGN})
|
||||
set(INCLUDE_POS)
|
||||
if (_LIB_INCLUDE_DIRS_PRIVATE)
|
||||
set(INCLUDE_POS BEFORE)
|
||||
endif()
|
||||
target_include_directories(${name};${INCLUDE_POS};${ARGN})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
@@ -454,8 +494,18 @@ function(wx_set_builtin_target_properties target_name)
|
||||
)
|
||||
endif()
|
||||
|
||||
target_include_directories(${target_name}
|
||||
BEFORE
|
||||
PUBLIC
|
||||
${wxSETUP_HEADER_PATH}
|
||||
)
|
||||
|
||||
set_target_properties(${target_name} PROPERTIES FOLDER "Third Party Libraries")
|
||||
|
||||
if(wxBUILD_SHARED OR wxBUILD_PIC)
|
||||
set_target_properties(${target_name} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif()
|
||||
|
||||
wx_set_common_target_properties(${target_name} DEFAULT_WARNINGS)
|
||||
if(NOT wxBUILD_SHARED)
|
||||
wx_install(TARGETS ${name} ARCHIVE DESTINATION "lib${wxPLATFORM_LIB_DIR}")
|
||||
@@ -465,11 +515,17 @@ endfunction()
|
||||
# Add a third party builtin library
|
||||
function(wx_add_builtin_library name)
|
||||
wx_list_add_prefix(src_list "${wxSOURCE_DIR}/" ${ARGN})
|
||||
add_library(${name} STATIC ${src_list})
|
||||
wx_set_builtin_target_properties(${name})
|
||||
if(wxBUILD_SHARED)
|
||||
set_target_properties(${name} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
|
||||
if(${name} MATCHES "wx.*")
|
||||
string(SUBSTRING ${name} 2 -1 name_short)
|
||||
else()
|
||||
set(name_short ${name})
|
||||
endif()
|
||||
|
||||
add_library(${name} STATIC ${src_list})
|
||||
add_library(wx::${name_short} ALIAS ${name})
|
||||
wx_set_builtin_target_properties(${name})
|
||||
set_target_properties(${name} PROPERTIES PROJECT_LABEL ${name_short})
|
||||
endfunction()
|
||||
|
||||
# List of third party libraries added via wx_add_thirdparty_library()
|
||||
@@ -520,16 +576,36 @@ function(wx_add_thirdparty_library var_name lib_name help_str)
|
||||
endfunction()
|
||||
|
||||
function(wx_print_thirdparty_library_summary)
|
||||
set(nameLength 0)
|
||||
set(nameValLength 0)
|
||||
set(var_name)
|
||||
set(message "Which libraries should wxWidgets use?\n")
|
||||
foreach(entry IN
|
||||
LISTS wxTHIRD_PARTY_LIBRARIES
|
||||
ITEMS wxUSE_STL "Use C++ STL classes")
|
||||
|
||||
foreach(entry IN LISTS wxTHIRD_PARTY_LIBRARIES)
|
||||
if(NOT var_name)
|
||||
set(var_name ${entry})
|
||||
else()
|
||||
wx_string_append(message " ${var_name}: ${${var_name}} (${entry})\n")
|
||||
string(LENGTH ${var_name} len)
|
||||
if(len GREATER nameLength)
|
||||
set(nameLength ${len})
|
||||
endif()
|
||||
string(LENGTH ${${var_name}} len)
|
||||
if(len GREATER nameValLength)
|
||||
set(nameValLength ${len})
|
||||
endif()
|
||||
set(var_name)
|
||||
endif()
|
||||
endforeach()
|
||||
math(EXPR nameLength "${nameLength}+1") # account for :
|
||||
|
||||
set(message "Which libraries should wxWidgets use?\n")
|
||||
foreach(entry IN LISTS wxTHIRD_PARTY_LIBRARIES)
|
||||
if(NOT var_name)
|
||||
set(var_name ${entry})
|
||||
else()
|
||||
set(namestr "${var_name}: ")
|
||||
set(nameval "${${var_name}} ")
|
||||
string(SUBSTRING ${namestr} 0 ${nameLength} namestr)
|
||||
string(SUBSTRING ${nameval} 0 ${nameValLength} nameval)
|
||||
wx_string_append(message " ${namestr} ${nameval} (${entry})\n")
|
||||
set(var_name)
|
||||
endif()
|
||||
endforeach()
|
||||
@@ -543,7 +619,7 @@ endfunction()
|
||||
# all following parameters a src files for the executable
|
||||
# source files are relative to samples/${name}/
|
||||
# Optionally:
|
||||
# DATA followed by required data files
|
||||
# DATA followed by required data files. Use a colon to separate different source and dest paths
|
||||
# DEFINITIONS list of definitions for the target
|
||||
# FOLDER subfolder in IDE
|
||||
# LIBRARIES followed by required libraries
|
||||
@@ -616,14 +692,34 @@ function(wx_add_sample name)
|
||||
else()
|
||||
set(exe_type WIN32 MACOSX_BUNDLE)
|
||||
endif()
|
||||
|
||||
if (WXMSW AND DEFINED wxUSE_DPI_AWARE_MANIFEST)
|
||||
set(wxDPI_MANIFEST_PRFIX "wx")
|
||||
if (wxARCH_SUFFIX)
|
||||
set(wxDPI_MANIFEST_PRFIX "amd64")
|
||||
endif()
|
||||
set(wxUSE_DPI_AWARE_MANIFEST_VALUE 0)
|
||||
if (${wxUSE_DPI_AWARE_MANIFEST} MATCHES "system")
|
||||
set(wxUSE_DPI_AWARE_MANIFEST_VALUE 1)
|
||||
list(APPEND src_files "${wxSOURCE_DIR}/include/wx/msw/${wxDPI_MANIFEST_PRFIX}_dpi_aware.manifest")
|
||||
elseif(${wxUSE_DPI_AWARE_MANIFEST} MATCHES "per-monitor")
|
||||
set(wxUSE_DPI_AWARE_MANIFEST_VALUE 2)
|
||||
list(APPEND src_files "${wxSOURCE_DIR}/include/wx/msw/${wxDPI_MANIFEST_PRFIX}_dpi_aware_pmv2.manifest")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_executable(${target_name} ${exe_type} ${src_files})
|
||||
|
||||
if (DEFINED wxUSE_DPI_AWARE_MANIFEST_VALUE)
|
||||
target_compile_definitions(${target_name} PRIVATE wxUSE_DPI_AWARE_MANIFEST=${wxUSE_DPI_AWARE_MANIFEST_VALUE})
|
||||
endif()
|
||||
endif()
|
||||
# All samples use at least the base library other 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)
|
||||
# UI samples always require core
|
||||
wx_exe_link_libraries(${target_name} core)
|
||||
wx_exe_link_libraries(${target_name} wxcore)
|
||||
else()
|
||||
target_compile_definitions(${target_name} PRIVATE wxUSE_GUI=0 wxUSE_BASE=1)
|
||||
endif()
|
||||
@@ -639,10 +735,19 @@ function(wx_add_sample name)
|
||||
if(SAMPLE_DATA)
|
||||
# TODO: handle data files differently for OS X bundles
|
||||
# Copy data files to output directory
|
||||
foreach(data_file ${SAMPLE_DATA})
|
||||
foreach(data_src ${SAMPLE_DATA})
|
||||
string(FIND ${data_src} ":" HAS_COLON)
|
||||
if(${HAS_COLON} GREATER -1)
|
||||
MATH(EXPR DEST_INDEX "${HAS_COLON}+1")
|
||||
string(SUBSTRING ${data_src} ${DEST_INDEX} -1 data_dst)
|
||||
string(SUBSTRING ${data_src} 0 ${HAS_COLON} data_src)
|
||||
else()
|
||||
set(data_dst ${data_src})
|
||||
endif()
|
||||
|
||||
list(APPEND cmds COMMAND ${CMAKE_COMMAND}
|
||||
-E copy ${wxSOURCE_DIR}/samples/${wxSAMPLE_SUBDIR}${name}/${data_file}
|
||||
${wxOUTPUT_DIR}/${wxPLATFORM_LIB_DIR}/${data_file})
|
||||
-E copy ${wxSOURCE_DIR}/samples/${wxSAMPLE_SUBDIR}${name}/${data_src}
|
||||
${wxOUTPUT_DIR}/${wxPLATFORM_LIB_DIR}/${data_dst})
|
||||
endforeach()
|
||||
add_custom_command(
|
||||
TARGET ${target_name} ${cmds}
|
||||
@@ -683,7 +788,9 @@ endfunction()
|
||||
|
||||
# Link libraries to a sample
|
||||
function(wx_link_sample_libraries name)
|
||||
target_link_libraries(${name} ${ARGN})
|
||||
if(TARGET ${name})
|
||||
target_link_libraries(${name} PUBLIC ${ARGN})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Add a option and mark is as advanced if it starts with wxUSE_
|
||||
@@ -772,7 +879,7 @@ function(wx_add_test name)
|
||||
endif()
|
||||
add_executable(${name} ${test_src})
|
||||
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)
|
||||
target_compile_definitions(${name} PRIVATE WXUSINGDLL)
|
||||
endif()
|
||||
|
@@ -8,23 +8,90 @@
|
||||
# Licence: wxWindows licence
|
||||
#############################################################################
|
||||
|
||||
if(DEFINED wxBUILD_USE_STATIC_RUNTIME AND wxBUILD_USE_STATIC_RUNTIME)
|
||||
# Set MSVC runtime flags for all configurations
|
||||
foreach(cfg "" ${CMAKE_CONFIGURATION_TYPES})
|
||||
set(flag_var CMAKE_CXX_FLAGS)
|
||||
if(cfg)
|
||||
string(TOUPPER ${cfg} cfg_upper)
|
||||
wx_string_append(flag_var "_${cfg_upper}")
|
||||
endif()
|
||||
if(${flag_var} MATCHES "/MD")
|
||||
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
|
||||
endif()
|
||||
endforeach()
|
||||
if(DEFINED wxBUILD_CXX_STANDARD AND NOT wxBUILD_CXX_STANDARD STREQUAL COMPILER_DEFAULT)
|
||||
set(CMAKE_CXX_STANDARD ${wxBUILD_CXX_STANDARD})
|
||||
endif()
|
||||
|
||||
if(wxBUILD_MSVC_MULTIPROC)
|
||||
wx_string_append(CMAKE_C_FLAGS " /MP")
|
||||
wx_string_append(CMAKE_CXX_FLAGS " /MP")
|
||||
if(MSVC)
|
||||
# Determine MSVC runtime library flag
|
||||
set(MSVC_LIB_USE "/MD")
|
||||
set(MSVC_LIB_REPLACE "/MT")
|
||||
if(wxBUILD_USE_STATIC_RUNTIME)
|
||||
set(MSVC_LIB_USE "/MT")
|
||||
set(MSVC_LIB_REPLACE "/MD")
|
||||
endif()
|
||||
# Set MSVC runtime flags for all configurations
|
||||
foreach(cfg "" ${CMAKE_CONFIGURATION_TYPES})
|
||||
set(c_flag_var CMAKE_C_FLAGS)
|
||||
set(cxx_flag_var CMAKE_CXX_FLAGS)
|
||||
if(cfg)
|
||||
string(TOUPPER ${cfg} cfg_upper)
|
||||
wx_string_append(c_flag_var "_${cfg_upper}")
|
||||
wx_string_append(cxx_flag_var "_${cfg_upper}")
|
||||
endif()
|
||||
if(${c_flag_var} MATCHES ${MSVC_LIB_REPLACE})
|
||||
string(REPLACE ${MSVC_LIB_REPLACE} ${MSVC_LIB_USE} ${c_flag_var} "${${c_flag_var}}")
|
||||
set(${c_flag_var} ${${c_flag_var}} CACHE STRING
|
||||
"Flags used by the C compiler during ${cfg_upper} builds." FORCE)
|
||||
endif()
|
||||
if(${cxx_flag_var} MATCHES ${MSVC_LIB_REPLACE})
|
||||
string(REPLACE ${MSVC_LIB_REPLACE} ${MSVC_LIB_USE} ${cxx_flag_var} "${${cxx_flag_var}}")
|
||||
set(${cxx_flag_var} ${${cxx_flag_var}} CACHE STRING
|
||||
"Flags used by the CXX compiler during ${cfg_upper} builds." FORCE)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(wxBUILD_OPTIMISE)
|
||||
set(MSVC_LINKER_RELEASE_FLAGS " /LTCG /OPT:REF /OPT:ICF")
|
||||
wx_string_append(CMAKE_EXE_LINKER_FLAGS_RELEASE "${MSVC_LINKER_RELEASE_FLAGS}")
|
||||
wx_string_append(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${MSVC_LINKER_RELEASE_FLAGS}")
|
||||
wx_string_append(CMAKE_STATIC_LINKER_FLAGS_RELEASE " /LTCG")
|
||||
set(MSVC_COMPILER_RELEASE_FLAGS " /Ox /Oi /Ot /Oy /GS- /Gy /GL /Gw")
|
||||
wx_string_append(CMAKE_CXX_FLAGS_RELEASE "${MSVC_COMPILER_RELEASE_FLAGS}")
|
||||
wx_string_append(CMAKE_C_FLAGS_RELEASE "${MSVC_COMPILER_RELEASE_FLAGS}")
|
||||
endif()
|
||||
|
||||
if(NOT wxBUILD_STRIPPED_RELEASE)
|
||||
set(MSVC_PDB_FLAG " /DEBUG")
|
||||
endif()
|
||||
wx_string_append(CMAKE_EXE_LINKER_FLAGS_RELEASE "${MSVC_PDB_FLAG}")
|
||||
wx_string_append(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${MSVC_PDB_FLAG}")
|
||||
|
||||
if(wxBUILD_MSVC_MULTIPROC)
|
||||
wx_string_append(CMAKE_C_FLAGS " /MP")
|
||||
wx_string_append(CMAKE_CXX_FLAGS " /MP")
|
||||
endif()
|
||||
|
||||
if(NOT POLICY CMP0092)
|
||||
string(REGEX REPLACE "/W[0-4]" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
string(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
|
||||
if(wxBUILD_OPTIMISE)
|
||||
set(GCC_PREFERRED_RELEASE_FLAGS " -O2 -fomit-frame-pointer")
|
||||
wx_string_append(CMAKE_CXX_FLAGS_RELEASE "${GCC_PREFERRED_RELEASE_FLAGS}")
|
||||
wx_string_append(CMAKE_C_FLAGS_RELEASE "${GCC_PREFERRED_RELEASE_FLAGS}")
|
||||
endif()
|
||||
|
||||
if(wxBUILD_STRIPPED_RELEASE)
|
||||
set(LD_STRIPPING_FLAG " -s")
|
||||
wx_string_append(CMAKE_EXE_LINKER_FLAGS_RELEASE "${LD_STRIPPING_FLAG}")
|
||||
wx_string_append(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${LD_STRIPPING_FLAG}")
|
||||
else()
|
||||
set(COMPILER_DBGSYM_FLAG " -g")
|
||||
wx_string_append(CMAKE_CXX_FLAGS_RELEASE "${COMPILER_DBGSYM_FLAG}")
|
||||
wx_string_append(CMAKE_C_FLAGS_RELEASE "${COMPILER_DBGSYM_FLAG}")
|
||||
endif()
|
||||
|
||||
if(wxBUILD_USE_STATIC_RUNTIME)
|
||||
if(MINGW)
|
||||
set(STATIC_LINKER_FLAGS " -static")
|
||||
else()
|
||||
set(STATIC_LINKER_FLAGS " -static-libgcc -static-libstdc++")
|
||||
endif()
|
||||
wx_string_append(CMAKE_EXE_LINKER_FLAGS "${STATIC_LINKER_FLAGS}")
|
||||
wx_string_append(CMAKE_SHARED_LINKER_FLAGS "${STATIC_LINKER_FLAGS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(wxBUILD_COMPATIBILITY VERSION_LESS 3.0)
|
||||
@@ -34,6 +101,15 @@ if(wxBUILD_COMPATIBILITY VERSION_LESS 3.1)
|
||||
set(WXWIN_COMPATIBILITY_3_0 ON)
|
||||
endif()
|
||||
|
||||
if(wxUSE_NO_RTTI)
|
||||
if(MSVC)
|
||||
add_compile_options("/GR-")
|
||||
elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
|
||||
wx_string_append(CMAKE_CXX_FLAGS " -fno-rtti")
|
||||
endif()
|
||||
add_definitions("-DwxNO_RTTI")
|
||||
endif()
|
||||
|
||||
# Build wxBUILD_FILE_ID used for config and setup path
|
||||
#TODO: build different id for WIN32
|
||||
set(wxBUILD_FILE_ID "${wxBUILD_TOOLKIT}${wxBUILD_WIDGETSET}-")
|
||||
@@ -46,6 +122,11 @@ if(NOT wxBUILD_SHARED)
|
||||
wx_string_append(wxBUILD_FILE_ID "-static")
|
||||
endif()
|
||||
wx_string_append(wxBUILD_FILE_ID "-${wxMAJOR_VERSION}.${wxMINOR_VERSION}")
|
||||
if(wxBUILD_FLAVOUR)
|
||||
set(lib_flavour ${wxBUILD_FLAVOUR})
|
||||
string(REPLACE "-" "_" lib_flavour ${lib_flavour})
|
||||
wx_string_append(wxBUILD_FILE_ID "-${lib_flavour}")
|
||||
endif()
|
||||
|
||||
set(wxARCH_SUFFIX)
|
||||
|
||||
@@ -68,19 +149,15 @@ else()
|
||||
set(wxCOMPILER_PREFIX)
|
||||
endif()
|
||||
|
||||
if(MSVC OR MINGW)
|
||||
if(MSVC)
|
||||
if(wxBUILD_SHARED)
|
||||
set(lib_suffix "dll")
|
||||
else()
|
||||
set(lib_suffix "lib")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# Include generator expression to suppress default Debug/Release pair
|
||||
set(wxPLATFORM_LIB_DIR "$<1:/>${wxCOMPILER_PREFIX}${wxARCH_SUFFIX}_${lib_suffix}")
|
||||
else()
|
||||
set(wxPLATFORM_LIB_DIR "/${wxCOMPILER_PREFIX}${wxARCH_SUFFIX}_${lib_suffix}")
|
||||
endif()
|
||||
# Include generator expression to suppress default Debug/Release pair
|
||||
set(wxPLATFORM_LIB_DIR "$<1:/>${wxCOMPILER_PREFIX}${wxARCH_SUFFIX}_${lib_suffix}")
|
||||
else()
|
||||
set(wxPLATFORM_LIB_DIR)
|
||||
endif()
|
||||
@@ -92,7 +169,7 @@ if(wxBUILD_CUSTOM_SETUP_HEADER_PATH)
|
||||
set(wxSETUP_HEADER_PATH ${wxBUILD_CUSTOM_SETUP_HEADER_PATH})
|
||||
else()
|
||||
# Set path where setup.h will be created
|
||||
if(MSVC OR MINGW)
|
||||
if(MSVC)
|
||||
if(wxUSE_UNICODE)
|
||||
set(lib_unicode u)
|
||||
else()
|
||||
@@ -116,54 +193,141 @@ if(DEFINED wxSETUP_HEADER_FILE_DEBUG)
|
||||
wx_string_append(wxSETUP_HEADER_PATH "$<$<CONFIG:Debug>:d>")
|
||||
endif()
|
||||
|
||||
if(wxUSE_ON_FATAL_EXCEPTION AND MSVC AND (MSVC_VERSION GREATER 1800) )
|
||||
# see include/wx/msw/seh.h for more details
|
||||
add_compile_options("/EHa")
|
||||
endif()
|
||||
|
||||
if(NOT wxBUILD_DEBUG_LEVEL STREQUAL "Default")
|
||||
add_compile_options("-DwxDEBUG_LEVEL=${wxBUILD_DEBUG_LEVEL}")
|
||||
endif()
|
||||
|
||||
# Constants for setup.h creation
|
||||
set(wxUSE_STD_DEFAULT ON)
|
||||
if(wxUSE_UNICODE)
|
||||
set(wxUSE_WCHAR_T ON)
|
||||
endif()
|
||||
if(NOT wxUSE_EXPAT)
|
||||
set(wxUSE_XRC OFF)
|
||||
endif()
|
||||
set(wxUSE_XML ${wxUSE_XRC})
|
||||
if(wxUSE_CONFIG)
|
||||
set(wxUSE_CONFIG_NATIVE ON)
|
||||
endif()
|
||||
|
||||
if(DEFINED wxUSE_OLE AND wxUSE_OLE)
|
||||
set(wxUSE_OLE_AUTOMATION ON)
|
||||
endif()
|
||||
|
||||
if(wxUSE_ACTIVEX AND DEFINED wxUSE_OLE AND NOT wxUSE_OLE)
|
||||
message(WARNING "wxActiveXContainer requires wxUSE_OLE... disabled")
|
||||
wx_option_force_value(wxUSE_ACTIVEX OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_DRAG_AND_DROP AND DEFINED wxUSE_OLE AND NOT wxUSE_OLE)
|
||||
message(WARNING "wxUSE_DRAG_AND_DROP requires wxUSE_OLE... disabled")
|
||||
wx_option_force_value(wxUSE_DRAG_AND_DROP OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_ACCESSIBILITY AND DEFINED wxUSE_OLE AND NOT wxUSE_OLE)
|
||||
message(WARNING "wxUSE_ACCESSIBILITY requires wxUSE_OLE... disabled")
|
||||
wx_option_force_value(wxUSE_ACCESSIBILITY OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_MEDIACTRL AND DEFINED wxUSE_ACTIVEX AND NOT wxUSE_ACTIVEX)
|
||||
message(WARNING "wxMediaCtl requires wxActiveXContainer... disabled")
|
||||
wx_option_force_value(wxUSE_MEDIACTRL OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_WEBVIEW AND DEFINED wxUSE_ACTIVEX AND NOT wxUSE_ACTIVEX)
|
||||
message(WARNING "wxWebView requires wxActiveXContainer... disabled")
|
||||
wx_option_force_value(wxUSE_WEBVIEW OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_OPENGL)
|
||||
set(wxUSE_GLCANVAS ON)
|
||||
endif()
|
||||
|
||||
if(wxUSE_ARCHIVE_STREAMS AND NOT wxUSE_STREAMS)
|
||||
message(WARNING "wxArchive requires wxStreams... disabled")
|
||||
wx_option_force_value(wxUSE_ARCHIVE_STREAMS OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_ZIPSTREAM AND (NOT wxUSE_ARCHIVE_STREAMS OR NOT wxUSE_ZLIB))
|
||||
message(WARNING "wxZip requires wxArchive or wxZlib... disabled")
|
||||
wx_option_force_value(wxUSE_ZIPSTREAM OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_TARSTREAM AND NOT wxUSE_ARCHIVE_STREAMS)
|
||||
message(WARNING "wxTar requires wxArchive... disabled")
|
||||
wx_option_force_value(wxUSE_TARSTREAM OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_FILESYSTEM AND (NOT wxUSE_STREAMS OR (NOT wxUSE_FILE AND NOT wxUSE_FFILE)))
|
||||
message(WARNING "wxFileSystem requires wxStreams and wxFile or wxFFile... disabled")
|
||||
wx_option_force_value(wxUSE_FILESYSTEM OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_FS_ARCHIVE AND (NOT wxUSE_FILESYSTEM OR NOT wxUSE_ARCHIVE_STREAMS))
|
||||
message(WARNING "wxArchiveFSHandler requires wxArchive and wxFileSystem... disabled")
|
||||
wx_option_force_value(wxUSE_FS_ARCHIVE OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_FS_ARCHIVE AND (NOT wxUSE_FILESYSTEM OR NOT wxUSE_ARCHIVE_STREAMS))
|
||||
message(WARNING "wxArchiveFSHandler requires wxArchive and wxFileSystem... disabled")
|
||||
wx_option_force_value(wxUSE_FS_ARCHIVE OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_FS_ZIP AND NOT wxUSE_FS_ARCHIVE)
|
||||
message(WARNING "wxZipFSHandler requires wxArchiveFSHandler... disabled")
|
||||
wx_option_force_value(wxUSE_FS_ZIP OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_TEXTFILE AND (NOT wxUSE_FILE OR NOT wxUSE_TEXTBUFFER))
|
||||
message(WARNING "wxTextFile requires wxFile and wxTextBuffer... disabled")
|
||||
wx_option_force_value(wxUSE_TEXTFILE OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_MIMETYPE AND NOT wxUSE_TEXTFILE)
|
||||
message(WARNING "wxUSE_MIMETYPE requires wxTextFile... disabled")
|
||||
wx_option_force_value(wxUSE_MIMETYPE OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_CONFIG)
|
||||
if(NOT wxUSE_TEXTFILE)
|
||||
message(WARNING "wxConfig requires wxTextFile... disabled")
|
||||
wx_option_force_value(wxUSE_CONFIG OFF)
|
||||
else()
|
||||
set(wxUSE_CONFIG_NATIVE ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(wxUSE_INTL AND NOT wxUSE_FILE)
|
||||
message(WARNING "I18n code requires wxFile... disabled")
|
||||
wx_option_force_value(wxUSE_INTL OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_THREADS)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
|
||||
if(wxUSE_LIBLZMA)
|
||||
find_package(LibLZMA REQUIRED)
|
||||
endif()
|
||||
|
||||
if(UNIX AND wxUSE_SECRETSTORE)
|
||||
# The required APIs are always available under MSW and OS X but we must
|
||||
# have GNOME libsecret under Unix to be able to compile this class.
|
||||
find_package(Libsecret REQUIRED)
|
||||
if(NOT LIBSECRET_FOUND)
|
||||
message(WARNING "libsecret not found, wxSecretStore won't be available")
|
||||
wx_option_force_value(wxUSE_SECRETSTORE OFF)
|
||||
find_package(LibLZMA)
|
||||
if(NOT LIBLZMA_FOUND)
|
||||
message(WARNING "libLZMA not found, LZMA compression won't be available")
|
||||
wx_option_force_value(wxUSE_LIBLZMA OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
if(wxUSE_SECRETSTORE AND NOT APPLE)
|
||||
# The required APIs are always available under MSW and OS X but we must
|
||||
# have GNOME libsecret under Unix to be able to compile this class.
|
||||
find_package(LIBSECRET)
|
||||
if(NOT LIBSECRET_FOUND)
|
||||
message(WARNING "libsecret not found, wxSecretStore won't be available")
|
||||
wx_option_force_value(wxUSE_SECRETSTORE OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(wxUSE_LIBICONV)
|
||||
find_package(ICONV)
|
||||
if(NOT ICONV_FOUND)
|
||||
message(WARNING "iconv not found")
|
||||
wx_option_force_value(wxUSE_LIBICONV OFF)
|
||||
endif()
|
||||
endif()
|
||||
endif(UNIX)
|
||||
|
||||
if(wxUSE_GUI)
|
||||
if(WXMSW AND wxUSE_METAFILE)
|
||||
# this one should probably be made separately configurable
|
||||
@@ -216,23 +380,38 @@ if(wxUSE_GUI)
|
||||
|
||||
# extra dependencies
|
||||
if(wxUSE_OPENGL)
|
||||
find_package(OpenGL)
|
||||
if(WXOSX_IPHONE)
|
||||
set(OPENGL_FOUND TRUE)
|
||||
set(OPENGL_LIBRARIES "-framework OpenGLES" "-framework QuartzCore")
|
||||
else()
|
||||
find_package(OpenGL)
|
||||
if(WXGTK3 AND OpenGL_EGL_FOUND AND wxUSE_GLCANVAS_EGL)
|
||||
set(OPENGL_LIBRARIES OpenGL::OpenGL OpenGL::EGL)
|
||||
find_package(WAYLANDEGL)
|
||||
if(WAYLANDEGL_FOUND AND wxHAVE_GDK_WAYLAND)
|
||||
list(APPEND OPENGL_LIBRARIES ${WAYLANDEGL_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(NOT OPENGL_FOUND)
|
||||
message(WARNING "opengl not found, wxGLCanvas won't be available")
|
||||
wx_option_force_value(wxUSE_OPENGL OFF)
|
||||
endif()
|
||||
if(UNIX AND (NOT WXGTK3 OR NOT OpenGL_EGL_FOUND))
|
||||
wx_option_force_value(wxUSE_GLCANVAS_EGL OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(wxUSE_WEBVIEW)
|
||||
if(WXGTK)
|
||||
if(wxUSE_WEBVIEW_WEBKIT)
|
||||
find_package(LibSoup)
|
||||
find_package(LIBSOUP)
|
||||
if(WXGTK2)
|
||||
find_package(Webkit 1.0)
|
||||
find_package(WEBKIT 1.0)
|
||||
elseif(WXGTK3)
|
||||
find_package(Webkit2)
|
||||
find_package(WEBKIT2)
|
||||
if(NOT WEBKIT2_FOUND)
|
||||
find_package(Webkit 3.0)
|
||||
find_package(WEBKIT 3.0)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -247,8 +426,8 @@ if(wxUSE_GUI)
|
||||
wx_option_force_value(wxUSE_WEBVIEW OFF)
|
||||
endif()
|
||||
elseif(WXMSW)
|
||||
if(NOT wxUSE_WEBVIEW_IE)
|
||||
message(WARNING "WebviewIE not found or enabled, wxWebview won't be available")
|
||||
if(NOT wxUSE_WEBVIEW_IE AND NOT wxUSE_WEBVIEW_EDGE)
|
||||
message(WARNING "WebviewIE and WebviewEdge not found or enabled, wxWebview won't be available")
|
||||
wx_option_force_value(wxUSE_WEBVIEW OFF)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
@@ -260,17 +439,18 @@ if(wxUSE_GUI)
|
||||
endif()
|
||||
|
||||
if(wxUSE_PRIVATE_FONTS AND WXGTK)
|
||||
find_package(Fontconfig)
|
||||
if(NOT FONTCONFIG_FOUND)
|
||||
message(WARNING "Fontconfig not found, Private fonts won't be available")
|
||||
find_package(FONTCONFIG)
|
||||
find_package(PANGOFT2)
|
||||
if(NOT FONTCONFIG_FOUND OR NOT PANGOFT2_FOUND)
|
||||
message(WARNING "Fontconfig or PangoFT2 not found, Private fonts won't be available")
|
||||
wx_option_force_value(wxUSE_PRIVATE_FONTS OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(wxUSE_MEDIACTRL AND UNIX AND NOT APPLE AND NOT WIN32)
|
||||
find_package(GStreamer 1.0 COMPONENTS video)
|
||||
if(wxUSE_MEDIACTRL AND WXGTK AND NOT APPLE AND NOT WIN32)
|
||||
find_package(GSTREAMER 1.0 COMPONENTS video)
|
||||
if(NOT GSTREAMER_FOUND)
|
||||
find_package(GStreamer 0.10 COMPONENTS interfaces)
|
||||
find_package(GSTREAMER 0.10 COMPONENTS interfaces)
|
||||
endif()
|
||||
|
||||
set(wxUSE_GSTREAMER ${GSTREAMER_FOUND})
|
||||
@@ -283,9 +463,12 @@ if(wxUSE_GUI)
|
||||
message(WARNING "GStreamer not found, wxMediaCtrl won't be available")
|
||||
wx_option_force_value(wxUSE_MEDIACTRL OFF)
|
||||
endif()
|
||||
else()
|
||||
set(wxUSE_GSTREAMER OFF)
|
||||
set(wxUSE_GSTREAMER_PLAYER OFF)
|
||||
endif()
|
||||
|
||||
if(UNIX AND wxUSE_LIBSDL)
|
||||
if(wxUSE_SOUND AND wxUSE_LIBSDL AND UNIX AND NOT APPLE)
|
||||
find_package(SDL2)
|
||||
if(NOT SDL2_FOUND)
|
||||
find_package(SDL)
|
||||
@@ -294,5 +477,106 @@ if(wxUSE_GUI)
|
||||
message(WARNING "SDL not found, SDL Audio back-end won't be available")
|
||||
wx_option_force_value(wxUSE_LIBSDL OFF)
|
||||
endif()
|
||||
else()
|
||||
set(wxUSE_LIBSDL OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_NOTIFICATION_MESSAGE AND UNIX AND WXGTK2 AND wxUSE_LIBNOTIFY)
|
||||
find_package(LIBNOTIFY)
|
||||
if(NOT LIBNOTIFY_FOUND)
|
||||
message(WARNING "Libnotify not found, it won't be used for notifications")
|
||||
wx_option_force_value(wxUSE_LIBNOTIFY OFF)
|
||||
elseif((LIBNOTIFY_VERSION GREATER 0.7) OR (LIBNOTIFY_VERSION EQUAL 0.7))
|
||||
set(wxUSE_LIBNOTIFY_0_7 ON)
|
||||
endif()
|
||||
else()
|
||||
set(wxUSE_LIBNOTIFY OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_UIACTIONSIMULATOR AND UNIX AND WXGTK)
|
||||
if(wxUSE_XTEST)
|
||||
find_package(XTEST)
|
||||
if(XTEST_FOUND)
|
||||
list(APPEND wxTOOLKIT_INCLUDE_DIRS ${XTEST_INCLUDE_DIRS})
|
||||
list(APPEND wxTOOLKIT_LIBRARIES ${XTEST_LIBRARIES})
|
||||
else()
|
||||
if(WXGTK3)
|
||||
# This class can't work without XTest with GTK+ 3
|
||||
# which uses XInput2 and so ignores XSendEvent().
|
||||
message(STATUS "XTest not found, wxUIActionSimulator won't be available")
|
||||
wx_option_force_value(wxUSE_UIACTIONSIMULATOR OFF)
|
||||
endif()
|
||||
# The other ports can use XSendEvent(), so don't warn
|
||||
wx_option_force_value(wxUSE_XTEST OFF)
|
||||
endif()
|
||||
else(WXGTK3)
|
||||
# As per above, wxUIActionSimulator can't be used in this case,
|
||||
# but there is no need to warn, presumably the user knows what
|
||||
# he's doing if wxUSE_XTEST was explicitly disabled.
|
||||
wx_option_force_value(wxUSE_UIACTIONSIMULATOR OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(wxUSE_HTML AND UNIX AND wxUSE_LIBMSPACK)
|
||||
find_package(MSPACK)
|
||||
if(NOT MSPACK_FOUND)
|
||||
message(STATUS "libmspack not found")
|
||||
wx_option_force_value(wxUSE_LIBMSPACK OFF)
|
||||
endif()
|
||||
else()
|
||||
set(wxUSE_LIBMSPACK OFF)
|
||||
endif()
|
||||
|
||||
if(WXGTK2 AND wxUSE_MIMETYPE AND wxUSE_LIBGNOMEVFS)
|
||||
find_package(GNOMEVFS2)
|
||||
if(GNOMEVFS2_FOUND)
|
||||
list(APPEND wxTOOLKIT_INCLUDE_DIRS ${GNOMEVFS2_INCLUDE_DIRS})
|
||||
list(APPEND wxTOOLKIT_LIBRARIES ${GNOMEVFS2_LIBRARIES})
|
||||
else()
|
||||
message(STATUS "libgnomevfs not found, library won't be used to associate MIME type")
|
||||
wx_option_force_value(wxUSE_LIBGNOMEVFS OFF)
|
||||
endif()
|
||||
else()
|
||||
set(wxUSE_LIBGNOMEVFS OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# test if precompiled headers are supported using the cotire test project
|
||||
if(DEFINED wxBUILD_PRECOMP_PREV AND NOT wxBUILD_PRECOMP STREQUAL wxBUILD_PRECOMP_PREV)
|
||||
set(CLEAN_PRECOMP_TEST TRUE)
|
||||
endif()
|
||||
set(wxBUILD_PRECOMP_PREV ${wxBUILD_PRECOMP} CACHE INTERNAL "")
|
||||
|
||||
if(wxBUILD_PRECOMP)
|
||||
if(DEFINED CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED)
|
||||
set(try_flags "-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=${CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED}")
|
||||
endif()
|
||||
if (CLEAN_PRECOMP_TEST)
|
||||
try_compile(RESULT_VAR_CLEAN
|
||||
"${wxBINARY_DIR}/CMakeFiles/cotire_test"
|
||||
"${wxSOURCE_DIR}/build/cmake/modules/cotire_test"
|
||||
CotireExample clean_cotire
|
||||
CMAKE_FLAGS ${try_flags}
|
||||
)
|
||||
endif()
|
||||
try_compile(RESULT_VAR
|
||||
"${wxBINARY_DIR}/CMakeFiles/cotire_test"
|
||||
"${wxSOURCE_DIR}/build/cmake/modules/cotire_test"
|
||||
CotireExample
|
||||
CMAKE_FLAGS ${try_flags}
|
||||
OUTPUT_VARIABLE OUTPUT_VAR
|
||||
)
|
||||
|
||||
# check if output has precompiled header warnings. The build can still succeed, so check the output
|
||||
# likely caused by gcc hardening: https://bugzilla.redhat.com/show_bug.cgi?id=1721553
|
||||
# cc1plus: warning /path/to/project/cotire/name_CXX_prefix.hxx.gch: had text segment at different address
|
||||
string(FIND "${OUTPUT_VAR}" "had text segment at different address" HAS_MESSAGE)
|
||||
if(${HAS_MESSAGE} GREATER -1)
|
||||
set(RESULT_VAR FALSE)
|
||||
endif()
|
||||
|
||||
if(NOT RESULT_VAR)
|
||||
message(WARNING "precompiled header (PCH) test failed, it will be turned off")
|
||||
wx_option_force_value(wxBUILD_PRECOMP OFF)
|
||||
endif()
|
||||
endif(wxBUILD_PRECOMP)
|
||||
|
@@ -12,27 +12,25 @@ if(NOT wxBUILD_INSTALL)
|
||||
endif()
|
||||
|
||||
install(CODE "message(STATUS \"Installing: Headers...\")")
|
||||
if(UNIX)
|
||||
wx_install(
|
||||
DIRECTORY "${wxSOURCE_DIR}/include/wx"
|
||||
DESTINATION "include/wx-${wxMAJOR_VERSION}.${wxMINOR_VERSION}")
|
||||
else()
|
||||
if(MSVC)
|
||||
wx_install(
|
||||
DIRECTORY "${wxSOURCE_DIR}/include/wx"
|
||||
DESTINATION "include")
|
||||
if(MSVC)
|
||||
wx_install(
|
||||
DIRECTORY "${wxSOURCE_DIR}/include/msvc"
|
||||
DESTINATION "include")
|
||||
endif()
|
||||
wx_install(
|
||||
DIRECTORY "${wxSOURCE_DIR}/include/msvc"
|
||||
DESTINATION "include")
|
||||
else()
|
||||
wx_install(
|
||||
DIRECTORY "${wxSOURCE_DIR}/include/wx"
|
||||
DESTINATION "include/wx-${wxMAJOR_VERSION}.${wxMINOR_VERSION}")
|
||||
endif()
|
||||
|
||||
# setup header and wx-config
|
||||
if(MSVC OR MINGW)
|
||||
if(MSVC)
|
||||
wx_install(
|
||||
DIRECTORY "${wxSETUP_HEADER_PATH}"
|
||||
DESTINATION "lib${wxPLATFORM_LIB_DIR}")
|
||||
elseif(UNIX)
|
||||
else()
|
||||
wx_install(
|
||||
DIRECTORY "${wxSETUP_HEADER_PATH}"
|
||||
DESTINATION "lib/wx/include")
|
||||
|
@@ -75,25 +75,32 @@ endforeach()
|
||||
if(wxBUILD_MONOLITHIC)
|
||||
# Create monolithic library target
|
||||
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)
|
||||
if(wxMONO_LIBS_${vis})
|
||||
# Remove libs included in mono from list
|
||||
foreach(lib IN LISTS LIBS)
|
||||
list(REMOVE_ITEM wxMONO_LIBS_${vis} ${lib})
|
||||
list(REMOVE_ITEM wxMONO_LIBS_${vis} wx${lib})
|
||||
endforeach()
|
||||
|
||||
target_link_libraries(mono ${vis} ${wxMONO_LIBS_${vis}})
|
||||
target_link_libraries(wxmono ${vis} ${wxMONO_LIBS_${vis}})
|
||||
endif()
|
||||
if(wxMONO_INCLUDE_DIRS_${vis})
|
||||
target_include_directories(mono ${vis} ${wxMONO_INCLUDE_DIRS_${vis}})
|
||||
set(INCLUDE_POS)
|
||||
if (vis STREQUAL PRIVATE)
|
||||
set(INCLUDE_POS BEFORE)
|
||||
endif()
|
||||
target_include_directories(wxmono ${INCLUDE_POS} ${vis} ${wxMONO_INCLUDE_DIRS_${vis}})
|
||||
endif()
|
||||
if(wxMONO_DEFINITIONS_${vis})
|
||||
target_compile_definitions(mono ${vis} ${wxMONO_DEFINITIONS_${vis}})
|
||||
target_compile_definitions(wxmono ${vis} ${wxMONO_DEFINITIONS_${vis}})
|
||||
endif()
|
||||
endforeach()
|
||||
foreach(file ${wxMONO_NONCOMPILED_CPP_FILES})
|
||||
set_source_files_properties(${file} PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
endforeach()
|
||||
wx_finalize_lib(mono)
|
||||
wx_finalize_lib(wxmono)
|
||||
endif()
|
||||
|
||||
# Propagate variable(s) to parent scope
|
||||
set(wxLIB_TARGETS ${wxLIB_TARGETS} PARENT_SCOPE)
|
||||
|
@@ -9,6 +9,6 @@
|
||||
|
||||
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)
|
||||
|
@@ -17,6 +17,6 @@ elseif(WXGTK2)
|
||||
wx_append_sources(AUI_FILES AUI_GTK)
|
||||
endif()
|
||||
|
||||
wx_add_library(aui ${AUI_FILES})
|
||||
wx_add_library(wxaui ${AUI_FILES})
|
||||
|
||||
wx_finalize_lib(aui)
|
||||
wx_finalize_lib(wxaui)
|
||||
|
@@ -17,57 +17,60 @@ if(WIN32)
|
||||
wx_append_sources(BASE_FILES BASE_AND_GUI_WIN32)
|
||||
elseif(APPLE)
|
||||
wx_append_sources(BASE_FILES BASE_OSX_SHARED)
|
||||
if(wxBUILD_TOOLKIT MATCHES "osx_iphone")
|
||||
wx_append_sources(BASE_FILES BASE_AND_GUI_OSX_IPHONE)
|
||||
else()
|
||||
if(WXOSX_COCOA)
|
||||
wx_append_sources(BASE_FILES BASE_AND_GUI_OSX_COCOA)
|
||||
endif()
|
||||
elseif(UNIX)
|
||||
wx_append_sources(BASE_FILES BASE_UNIX)
|
||||
endif()
|
||||
|
||||
wx_add_library(base IS_BASE ${BASE_FILES})
|
||||
wx_add_library(wxbase IS_BASE ${BASE_FILES})
|
||||
|
||||
if(NOT wxBUILD_MONOLITHIC)
|
||||
wx_lib_compile_definitions(base PRIVATE wxUSE_BASE=1)
|
||||
wx_lib_compile_definitions(wxbase PRIVATE wxUSE_BASE=1)
|
||||
endif()
|
||||
|
||||
if(wxUSE_ZLIB)
|
||||
wx_lib_include_directories(base PRIVATE ${ZLIB_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(base PRIVATE ${ZLIB_LIBRARIES})
|
||||
wx_lib_include_directories(wxbase PRIVATE ${ZLIB_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(wxbase PRIVATE ${ZLIB_LIBRARIES})
|
||||
endif()
|
||||
if(wxUSE_REGEX)
|
||||
wx_lib_include_directories(base PRIVATE ${REGEX_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(base PRIVATE ${REGEX_LIBRARIES})
|
||||
wx_lib_include_directories(wxbase PRIVATE ${REGEX_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(wxbase PRIVATE ${REGEX_LIBRARIES})
|
||||
endif()
|
||||
if(wxUSE_LIBLZMA)
|
||||
wx_lib_include_directories(base PRIVATE ${LIBLZMA_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(base PRIVATE ${LIBLZMA_LIBRARIES})
|
||||
wx_lib_include_directories(wxbase PRIVATE ${LIBLZMA_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(wxbase PRIVATE ${LIBLZMA_LIBRARIES})
|
||||
endif()
|
||||
if(UNIX AND wxUSE_SECRETSTORE)
|
||||
wx_lib_include_directories(base PRIVATE ${LIBSECRET_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(base PRIVATE ${LIBSECRET_LIBRARIES})
|
||||
wx_lib_include_directories(wxbase PRIVATE ${LIBSECRET_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(wxbase PRIVATE ${LIBSECRET_LIBRARIES})
|
||||
endif()
|
||||
if(wxUSE_LIBICONV AND ICONV_FOUND)
|
||||
wx_lib_include_directories(base PRIVATE ${ICONV_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(base PRIVATE ${ICONV_LIBRARIES})
|
||||
if(wxUSE_LIBICONV)
|
||||
wx_lib_include_directories(wxbase PRIVATE ${ICONV_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(wxbase PRIVATE ${ICONV_LIBRARIES})
|
||||
endif()
|
||||
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()
|
||||
|
||||
if(APPLE)
|
||||
wx_lib_link_libraries(base
|
||||
PRIVATE
|
||||
"-framework Security"
|
||||
wx_lib_link_libraries(wxbase
|
||||
PUBLIC
|
||||
"-framework Carbon"
|
||||
"-framework Cocoa"
|
||||
"-framework CoreFoundation"
|
||||
"-framework IOKit"
|
||||
)
|
||||
if(WXOSX_COCOA)
|
||||
wx_lib_link_libraries(wxbase
|
||||
PRIVATE
|
||||
"-framework Security"
|
||||
PUBLIC
|
||||
"-framework Carbon"
|
||||
"-framework Cocoa"
|
||||
"-framework IOKit"
|
||||
)
|
||||
endif()
|
||||
elseif(UNIX)
|
||||
wx_lib_link_libraries(base PRIVATE dl)
|
||||
wx_lib_link_libraries(wxbase PRIVATE dl)
|
||||
endif()
|
||||
|
||||
wx_finalize_lib(base)
|
||||
wx_finalize_lib(wxbase)
|
||||
|
@@ -25,6 +25,9 @@ if(WXMSW)
|
||||
wx_append_sources(CORE_SRC MSW_DESKTOP_LOWLEVEL)
|
||||
wx_append_sources(CORE_SRC MSW)
|
||||
wx_append_sources(CORE_SRC MSW_DESKTOP)
|
||||
if(NOT wxUSE_OLE)
|
||||
wx_list_add_prefix(CORE_SRC "${wxSOURCE_DIR}/" "src/generic/dirdlgg.cpp")
|
||||
endif()
|
||||
elseif(WXGTK)
|
||||
if(WXGTK2)
|
||||
wx_append_sources(CORE_SRC GTK2_LOWLEVEL)
|
||||
@@ -44,6 +47,9 @@ elseif(WXOSX_COCOA)
|
||||
wx_append_sources(CORE_SRC OSX_LOWLEVEL)
|
||||
wx_append_sources(CORE_SRC OSX_SHARED)
|
||||
wx_append_sources(CORE_SRC OSX_COCOA)
|
||||
elseif(WXOSX_IPHONE)
|
||||
wx_append_sources(CORE_SRC OSX_LOWLEVEL)
|
||||
wx_append_sources(CORE_SRC OSX_IPHONE)
|
||||
elseif(WXQT)
|
||||
wx_append_sources(CORE_SRC QT)
|
||||
if(WIN32)
|
||||
@@ -51,40 +57,53 @@ elseif(WXQT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
wx_add_library(core ${CORE_SRC})
|
||||
wx_add_library(wxcore ${CORE_SRC})
|
||||
foreach(lib JPEG PNG TIFF)
|
||||
if(${lib}_LIBRARIES)
|
||||
if(lib STREQUAL JPEG)
|
||||
wx_lib_include_directories(core PRIVATE ${${lib}_INCLUDE_DIR})
|
||||
wx_lib_include_directories(wxcore PRIVATE ${${lib}_INCLUDE_DIR})
|
||||
else()
|
||||
wx_lib_include_directories(core PRIVATE ${${lib}_INCLUDE_DIRS})
|
||||
wx_lib_include_directories(wxcore PRIVATE ${${lib}_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
wx_lib_link_libraries(core PRIVATE ${${lib}_LIBRARIES})
|
||||
wx_lib_link_libraries(wxcore PRIVATE ${${lib}_LIBRARIES})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(WIN32)
|
||||
wx_lib_link_libraries(core PRIVATE winmm)
|
||||
wx_lib_link_libraries(wxcore PRIVATE winmm)
|
||||
endif()
|
||||
if(WXOSX_COCOA)
|
||||
wx_lib_link_libraries(core PUBLIC "-framework AudioToolbox")
|
||||
wx_lib_link_libraries(wxcore PUBLIC "-framework AudioToolbox")
|
||||
if(wxUSE_WEBKIT)
|
||||
wx_lib_link_libraries(core PUBLIC "-framework WebKit")
|
||||
wx_lib_link_libraries(wxcore PUBLIC "-framework WebKit")
|
||||
endif()
|
||||
endif()
|
||||
if(WXOSX_IPHONE)
|
||||
wx_lib_link_libraries(wxcore
|
||||
PUBLIC
|
||||
"-framework AudioToolbox"
|
||||
"-framework CoreGraphics"
|
||||
"-framework CoreText"
|
||||
"-framework UIKit"
|
||||
)
|
||||
endif()
|
||||
if(WXGTK AND wxUSE_PRIVATE_FONTS)
|
||||
wx_lib_include_directories(core PUBLIC ${FONTCONFIG_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(core PUBLIC ${FONTCONFIG_LIBRARIES})
|
||||
wx_lib_include_directories(wxcore PUBLIC ${FONTCONFIG_INCLUDE_DIRS} ${PANGOFT2_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(wxcore PUBLIC ${FONTCONFIG_LIBRARIES} ${PANGOFT2_LIBRARIES})
|
||||
endif()
|
||||
if(UNIX AND wxUSE_LIBSDL)
|
||||
if(wxUSE_LIBSDL)
|
||||
if(SDL2_FOUND)
|
||||
wx_lib_include_directories(core PUBLIC ${SDL2_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(core PUBLIC ${SDL2_LIBRARY})
|
||||
wx_lib_include_directories(wxcore PUBLIC ${SDL2_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(wxcore PUBLIC ${SDL2_LIBRARY})
|
||||
elseif(SDL_FOUND)
|
||||
wx_lib_include_directories(core PUBLIC ${SDL_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(core PUBLIC ${SDL_LIBRARY})
|
||||
wx_lib_include_directories(wxcore PUBLIC ${SDL_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(wxcore PUBLIC ${SDL_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
if(wxUSE_LIBNOTIFY)
|
||||
wx_lib_include_directories(wxcore PUBLIC ${LIBNOTIFY_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(wxcore PUBLIC ${LIBNOTIFY_LIBRARIES})
|
||||
endif()
|
||||
|
||||
wx_finalize_lib(core)
|
||||
wx_finalize_lib(wxcore)
|
||||
|
@@ -8,6 +8,8 @@
|
||||
#############################################################################
|
||||
|
||||
if(wxUSE_EXPAT STREQUAL "builtin")
|
||||
# TODO: implement building expat via its CMake file, using
|
||||
# add_subdirectory or ExternalProject_Add
|
||||
wx_add_builtin_library(wxexpat
|
||||
src/expat/expat/lib/xmlparse.c
|
||||
src/expat/expat/lib/xmlrole.c
|
||||
|
@@ -15,14 +15,16 @@ if(WXMSW)
|
||||
wx_append_sources(GL_FILES OPENGL_MSW)
|
||||
elseif(WXGTK)
|
||||
wx_append_sources(GL_FILES OPENGL_GTK)
|
||||
elseif(APPLE)
|
||||
wx_append_sources(GL_FILES OPENGL_OSX_SHARED)
|
||||
elseif(WXOSX_COCOA)
|
||||
wx_append_sources(GL_FILES OPENGL_OSX_COCOA)
|
||||
elseif(WXOSX_IPHONE)
|
||||
wx_append_sources(GL_FILES OPENGL_OSX_IPHONE)
|
||||
elseif(WXQT)
|
||||
wx_append_sources(GL_FILES OPENGL_QT)
|
||||
endif()
|
||||
|
||||
wx_add_library(gl ${GL_FILES})
|
||||
wx_lib_include_directories(gl PUBLIC ${OPENGL_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(gl PUBLIC ${OPENGL_LIBRARIES})
|
||||
wx_add_library(wxgl ${GL_FILES})
|
||||
wx_lib_include_directories(wxgl PUBLIC ${OPENGL_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(wxgl PUBLIC ${OPENGL_LIBRARIES})
|
||||
|
||||
wx_finalize_lib(gl)
|
||||
wx_finalize_lib(wxgl)
|
||||
|
@@ -11,10 +11,15 @@ include(../../source_groups.cmake)
|
||||
|
||||
wx_append_sources(HTML_FILES HTML_CMN)
|
||||
|
||||
if(WIN32)
|
||||
if(WIN32 OR wxUSE_LIBMSPACK)
|
||||
wx_append_sources(HTML_FILES HTML_MSW)
|
||||
endif()
|
||||
|
||||
wx_add_library(html ${HTML_FILES})
|
||||
wx_add_library(wxhtml ${HTML_FILES})
|
||||
|
||||
wx_finalize_lib(html)
|
||||
if(wxUSE_LIBMSPACK)
|
||||
wx_lib_include_directories(wxhtml PRIVATE ${MSPACK_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(wxhtml PRIVATE ${MSPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
wx_finalize_lib(wxhtml)
|
||||
|
@@ -15,43 +15,43 @@ if(WXMSW)
|
||||
wx_append_sources(MEDIA_FILES MEDIA_MSW)
|
||||
elseif(WXOSX_COCOA)
|
||||
wx_append_sources(MEDIA_FILES MEDIA_OSX_COCOA)
|
||||
elseif(UNIX)
|
||||
elseif(WXOSX_IPHONE)
|
||||
wx_append_sources(MEDIA_FILES MEDIA_OSX_IPHONE)
|
||||
elseif(WXGTK)
|
||||
wx_append_sources(MEDIA_FILES MEDIA_UNIX)
|
||||
elseif(WXQT)
|
||||
wx_append_sources(MEDIA_FILES MEDIA_QT)
|
||||
endif()
|
||||
|
||||
wx_add_library(media ${MEDIA_FILES})
|
||||
if(WXOSX_COCOA)
|
||||
# TODO: add version detection of some kind and/or wx_option
|
||||
wx_lib_compile_definitions(media PRIVATE -DwxOSX_USE_QTKIT=0)
|
||||
wx_lib_link_libraries(media PUBLIC
|
||||
wx_add_library(wxmedia ${MEDIA_FILES})
|
||||
if(WXOSX)
|
||||
wx_lib_link_libraries(wxmedia PUBLIC
|
||||
"-framework AVFoundation"
|
||||
"-framework AVKit"
|
||||
"-framework CoreMedia"
|
||||
"-weak_framework AVKit"
|
||||
)
|
||||
elseif(UNIX)
|
||||
wx_lib_include_directories(media PUBLIC ${GSTREAMER_INCLUDE_DIRS})
|
||||
elseif(WXGTK)
|
||||
wx_lib_include_directories(wxmedia PUBLIC ${GSTREAMER_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()
|
||||
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()
|
||||
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()
|
||||
|
||||
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_LIBRARIES})
|
||||
wx_lib_link_libraries(wxmedia PUBLIC ${GSTREAMER_LIBRARIES})
|
||||
if(GSTREAMER_INTERFACES_LIBRARIES)
|
||||
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_INTERFACES_LIBRARIES})
|
||||
wx_lib_link_libraries(wxmedia PUBLIC ${GSTREAMER_INTERFACES_LIBRARIES})
|
||||
endif()
|
||||
if(GSTREAMER_VIDEO_LIBRARIES)
|
||||
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_VIDEO_LIBRARIES})
|
||||
wx_lib_link_libraries(wxmedia PUBLIC ${GSTREAMER_VIDEO_LIBRARIES})
|
||||
endif()
|
||||
if(GSTREAMER_PLAYER_LIBRARIES)
|
||||
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_PLAYER_LIBRARIES})
|
||||
wx_lib_link_libraries(wxmedia PUBLIC ${GSTREAMER_PLAYER_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
wx_finalize_lib(media)
|
||||
wx_finalize_lib(wxmedia)
|
||||
|
@@ -21,21 +21,21 @@ if(UNIX AND NOT WIN32)
|
||||
wx_append_sources(NET_FILES NET_UNIX)
|
||||
endif()
|
||||
|
||||
wx_add_library(net IS_BASE ${NET_FILES})
|
||||
wx_add_library(wxnet IS_BASE ${NET_FILES})
|
||||
|
||||
if(WIN32)
|
||||
wx_lib_link_libraries(net PRIVATE ws2_32)
|
||||
wx_lib_link_libraries(wxnet PRIVATE ws2_32)
|
||||
|
||||
if(wxUSE_WEBREQUEST_WINHTTP)
|
||||
wx_lib_link_libraries(net PRIVATE Winhttp)
|
||||
wx_lib_link_libraries(wxnet PRIVATE Winhttp)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (wxUSE_WEBREQUEST_CURL)
|
||||
find_package(CURL REQUIRED)
|
||||
|
||||
target_include_directories(net PRIVATE ${CURL_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(net PRIVATE ${CURL_LIBRARIES})
|
||||
target_include_directories(wxnet PRIVATE ${CURL_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(wxnet PRIVATE ${CURL_LIBRARIES})
|
||||
endif()
|
||||
|
||||
wx_finalize_lib(net)
|
||||
wx_finalize_lib(wxnet)
|
||||
|
@@ -8,6 +8,16 @@
|
||||
#############################################################################
|
||||
|
||||
if(wxUSE_LIBPNG STREQUAL "builtin")
|
||||
# TODO: implement building libpng via its CMake file, using
|
||||
# add_subdirectory or ExternalProject_Add
|
||||
if(NOT MSVC)
|
||||
set(PNG_EXTRA_SOURCES
|
||||
src/png/mips/filter_msa_intrinsics.c
|
||||
src/png/mips/mips_init.c
|
||||
src/png/powerpc/filter_vsx_intrinsics.c
|
||||
src/png/powerpc/powerpc_init.c
|
||||
)
|
||||
endif()
|
||||
wx_add_builtin_library(wxpng
|
||||
src/png/png.c
|
||||
src/png/pngerror.c
|
||||
@@ -24,6 +34,12 @@ if(wxUSE_LIBPNG STREQUAL "builtin")
|
||||
src/png/pngwrite.c
|
||||
src/png/pngwtran.c
|
||||
src/png/pngwutil.c
|
||||
src/png/arm/arm_init.c
|
||||
src/png/arm/filter_neon_intrinsics.c
|
||||
src/png/arm/palette_neon_intrinsics.c
|
||||
src/png/intel/intel_init.c
|
||||
src/png/intel/filter_sse2_intrinsics.c
|
||||
${PNG_EXTRA_SOURCES}
|
||||
)
|
||||
if(WIN32)
|
||||
# define this to get rid of a warning about using POSIX lfind():
|
||||
@@ -32,6 +48,7 @@ if(wxUSE_LIBPNG STREQUAL "builtin")
|
||||
# http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101278
|
||||
target_compile_definitions(wxpng PRIVATE _CRT_NONSTDC_NO_WARNINGS)
|
||||
endif()
|
||||
target_compile_definitions(wxpng PRIVATE PNG_INTEL_SSE)
|
||||
target_include_directories(wxpng PRIVATE ${ZLIB_INCLUDE_DIRS})
|
||||
target_link_libraries(wxpng PRIVATE ${ZLIB_LIBRARIES})
|
||||
set(PNG_LIBRARIES wxpng)
|
||||
|
@@ -11,6 +11,6 @@ include(../../source_groups.cmake)
|
||||
|
||||
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)
|
||||
|
@@ -11,7 +11,7 @@ include(../../source_groups.cmake)
|
||||
|
||||
wx_append_sources(QA_FILES QA)
|
||||
|
||||
wx_add_library(qa ${QA_FILES})
|
||||
wx_lib_link_libraries(qa PUBLIC xml)
|
||||
wx_add_library(wxqa ${QA_FILES})
|
||||
wx_lib_link_libraries(wxqa PUBLIC wxxml)
|
||||
|
||||
wx_finalize_lib(qa)
|
||||
wx_finalize_lib(wxqa)
|
||||
|
@@ -8,7 +8,6 @@
|
||||
#############################################################################
|
||||
|
||||
if(wxUSE_REGEX)
|
||||
# TODO: Forcing builtin until sys is implemented
|
||||
set(wxUSE_REGEX builtin)
|
||||
wx_add_builtin_library(wxregex
|
||||
src/regex/regcomp.c
|
||||
@@ -20,5 +19,3 @@ if(wxUSE_REGEX)
|
||||
set(REGEX_LIBRARIES wxregex)
|
||||
set(REGEX_INCLUDE_DIRS ${wxSOURCE_DIR}/src/regex)
|
||||
endif()
|
||||
|
||||
#TODO: find external lib and include dir
|
||||
|
@@ -11,6 +11,6 @@ include(../../source_groups.cmake)
|
||||
|
||||
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)
|
||||
|
@@ -11,7 +11,7 @@ include(../../source_groups.cmake)
|
||||
|
||||
wx_append_sources(RICHTEXT_FILES RICHTEXT)
|
||||
|
||||
wx_add_library(richtext ${RICHTEXT_FILES})
|
||||
wx_lib_link_libraries(richtext PRIVATE html xml)
|
||||
wx_add_library(wxrichtext ${RICHTEXT_FILES})
|
||||
wx_lib_link_libraries(wxrichtext PRIVATE wxhtml wxxml)
|
||||
|
||||
wx_finalize_lib(richtext)
|
||||
wx_finalize_lib(wxrichtext)
|
||||
|
@@ -9,7 +9,11 @@
|
||||
|
||||
include(../../source_groups.cmake)
|
||||
|
||||
wx_append_sources(STC_FILES STC)
|
||||
wx_append_sources(STC_FILES STC_CMN)
|
||||
|
||||
if(WXOSX_COCOA)
|
||||
wx_append_sources(STC_FILES STC_OSX_COCOA)
|
||||
endif()
|
||||
|
||||
wx_add_builtin_library(wxscintilla
|
||||
src/stc/scintilla/lexers/LexA68k.cxx
|
||||
@@ -163,6 +167,8 @@ target_include_directories(wxscintilla PRIVATE
|
||||
target_compile_definitions(wxscintilla PUBLIC
|
||||
NO_CXX11_REGEX
|
||||
__WX__
|
||||
SCI_LEXER
|
||||
LINK_LEXERS
|
||||
)
|
||||
|
||||
if(wxBUILD_PRECOMP)
|
||||
@@ -170,22 +176,27 @@ if(wxBUILD_PRECOMP)
|
||||
# standard c++ headers when using clang.
|
||||
# Do not disable precompiled headers entirely but use the main Scintilla
|
||||
# header as prefix header so there is at least a small speedup.
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
set(wxSCINTILLA_PREC_HEADER "${wxSOURCE_DIR}/src/stc/scintilla/include/Scintilla.h")
|
||||
endif()
|
||||
wx_target_enable_precomp(wxscintilla ${wxSCINTILLA_PREC_HEADER})
|
||||
endif()
|
||||
|
||||
wx_add_library(stc ${STC_FILES})
|
||||
wx_lib_include_directories(stc PRIVATE
|
||||
wx_add_library(wxstc ${STC_FILES})
|
||||
wx_lib_include_directories(wxstc PRIVATE
|
||||
${wxSOURCE_DIR}/src/stc/scintilla/include
|
||||
${wxSOURCE_DIR}/src/stc/scintilla/lexlib
|
||||
${wxSOURCE_DIR}/src/stc/scintilla/src
|
||||
)
|
||||
wx_lib_compile_definitions(stc PRIVATE
|
||||
wx_lib_compile_definitions(wxstc PRIVATE
|
||||
NO_CXX11_REGEX
|
||||
__WX__
|
||||
SCI_LEXER
|
||||
LINK_LEXERS
|
||||
)
|
||||
wx_lib_link_libraries(stc PRIVATE wxscintilla)
|
||||
wx_lib_link_libraries(wxstc PRIVATE wxscintilla)
|
||||
if(WXMSW)
|
||||
wx_lib_link_libraries(wxstc PRIVATE imm32)
|
||||
endif()
|
||||
|
||||
wx_finalize_lib(stc)
|
||||
wx_finalize_lib(wxstc)
|
||||
|
@@ -8,13 +8,8 @@
|
||||
#############################################################################
|
||||
|
||||
if(wxUSE_LIBTIFF STREQUAL "builtin")
|
||||
# TODO: implement building libtiff via ExternalProject_Add()
|
||||
if(UNIX AND NOT APPLE)
|
||||
message(WARNING "Builtin libtiff on unix is currently not supported")
|
||||
wx_option_force_value(wxUSE_LIBTIFF OFF)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# TODO: implement building libtiff via its CMake file, using
|
||||
# add_subdirectory or ExternalProject_Add
|
||||
if(WIN32)
|
||||
set(TIFF_PLATFORM_SRC src/tiff/libtiff/tif_win32.c)
|
||||
elseif(UNIX)
|
||||
|
@@ -23,61 +23,77 @@ elseif(APPLE)
|
||||
wx_append_sources(WEBVIEW_FILES WEBVIEW_OSX_SHARED)
|
||||
endif()
|
||||
|
||||
wx_add_library(webview ${WEBVIEW_FILES})
|
||||
wx_add_library(wxwebview ${WEBVIEW_FILES})
|
||||
|
||||
if(WXGTK AND wxUSE_WEBVIEW_WEBKIT2)
|
||||
set(WX_WEB_EXTENSIONS_DIRECTORY "lib/wx/${wxMAJOR_VERSION}.${wxMINOR_VERSION}/web-extensions")
|
||||
wx_lib_compile_definitions(webview PRIVATE
|
||||
-DWX_WEB_EXTENSIONS_DIRECTORY="${CMAKE_INSTALL_PREFIX}/${WX_WEB_EXTENSIONS_DIRECTORY}"
|
||||
)
|
||||
if(wxVERSION_IS_DEV)
|
||||
set(WX_WEB_EXTENSIONS_DIRECTORY "lib/wx/${wxMAJOR_VERSION}.${wxMINOR_VERSION}.${wxRELEASE_NUMBER}/web-extensions")
|
||||
else()
|
||||
set(WX_WEB_EXTENSIONS_DIRECTORY "lib/wx/${wxMAJOR_VERSION}.${wxMINOR_VERSION}/web-extensions")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
wx_lib_link_libraries(webview PUBLIC "-framework WebKit")
|
||||
wx_lib_link_libraries(wxwebview PUBLIC "-framework WebKit")
|
||||
elseif(WXMSW)
|
||||
if(wxUSE_WEBVIEW_EDGE)
|
||||
wx_lib_include_directories(wxwebview PRIVATE "${PROJECT_SOURCE_DIR}/3rdparty/webview2/build/native/include")
|
||||
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set(WEBVIEW2_ARCH x86)
|
||||
else()
|
||||
set(WEBVIEW2_ARCH x64)
|
||||
endif()
|
||||
|
||||
add_custom_command(TARGET wxwebview POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
"${PROJECT_SOURCE_DIR}/3rdparty/webview2/build/native/${WEBVIEW2_ARCH}/WebView2Loader.dll"
|
||||
"$<TARGET_FILE_DIR:wxwebview>/WebView2Loader.dll")
|
||||
endif()
|
||||
elseif(WXGTK)
|
||||
if(LIBSOUP_FOUND)
|
||||
wx_lib_include_directories(webview PUBLIC ${LIBSOUP_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(webview PUBLIC ${LIBSOUP_LIBRARIES})
|
||||
wx_lib_include_directories(wxwebview PUBLIC ${LIBSOUP_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(wxwebview PUBLIC ${LIBSOUP_LIBRARIES})
|
||||
endif()
|
||||
if(wxUSE_WEBVIEW_WEBKIT2)
|
||||
wx_lib_include_directories(webview PUBLIC ${WEBKIT2_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(webview PUBLIC ${WEBKIT2_LIBRARIES})
|
||||
wx_lib_include_directories(wxwebview PUBLIC ${WEBKIT2_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(wxwebview PUBLIC ${WEBKIT2_LIBRARIES})
|
||||
elseif(wxUSE_WEBVIEW_WEBKIT)
|
||||
wx_lib_include_directories(webview PUBLIC ${WEBKIT_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(webview PUBLIC ${WEBKIT_LIBRARIES})
|
||||
wx_lib_include_directories(wxwebview PUBLIC ${WEBKIT_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(wxwebview PUBLIC ${WEBKIT_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
wx_finalize_lib(webview)
|
||||
wx_finalize_lib(wxwebview)
|
||||
|
||||
# webkit extension plugin
|
||||
# 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.
|
||||
if(WXGTK AND wxUSE_WEBVIEW_WEBKIT2)
|
||||
wx_append_sources(WEBKIT2_EXT_FILES WEBVIEW_WEBKIT2_EXTENSION)
|
||||
add_library(webkit2_ext SHARED ${WEBKIT2_EXT_FILES})
|
||||
wx_set_target_properties(webkit2_ext false)
|
||||
add_library(wxwebkit2_ext SHARED ${WEBKIT2_EXT_FILES})
|
||||
wx_set_target_properties(wxwebkit2_ext false)
|
||||
|
||||
# Change output name to match expected name in webview_webkit2.cpp: webkit2_ext*
|
||||
if(wxUSE_UNICODE)
|
||||
set(lib_unicode u)
|
||||
endif()
|
||||
set_target_properties(webkit2_ext PROPERTIES PREFIX "")
|
||||
set_target_properties(webkit2_ext PROPERTIES
|
||||
set_target_properties(wxwebkit2_ext PROPERTIES PREFIX "")
|
||||
set_target_properties(wxwebkit2_ext PROPERTIES
|
||||
OUTPUT_NAME "webkit2_ext${lib_unicode}-${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}
|
||||
${WEBKIT2_INCLUDE_DIR}
|
||||
)
|
||||
target_link_libraries(webkit2_ext PUBLIC
|
||||
target_link_libraries(wxwebkit2_ext PUBLIC
|
||||
${LIBSOUP_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()
|
||||
|
@@ -10,8 +10,8 @@
|
||||
include(../../source_groups.cmake)
|
||||
|
||||
wx_append_sources(XML_FILES XML)
|
||||
wx_add_library(xml IS_BASE ${XML_FILES})
|
||||
wx_lib_link_libraries(xml PRIVATE ${EXPAT_LIBRARIES})
|
||||
wx_lib_include_directories(xml PRIVATE ${EXPAT_INCLUDE_DIRS})
|
||||
wx_add_library(wxxml IS_BASE ${XML_FILES})
|
||||
wx_lib_link_libraries(wxxml PRIVATE ${EXPAT_LIBRARIES})
|
||||
wx_lib_include_directories(wxxml PRIVATE ${EXPAT_INCLUDE_DIRS})
|
||||
|
||||
wx_finalize_lib(xml)
|
||||
wx_finalize_lib(wxxml)
|
||||
|
@@ -11,7 +11,7 @@ include(../../source_groups.cmake)
|
||||
|
||||
wx_append_sources(XRC_FILES XRC)
|
||||
|
||||
wx_add_library(xrc ${XRC_FILES})
|
||||
wx_lib_link_libraries(xrc PRIVATE html xml)
|
||||
wx_add_library(wxxrc ${XRC_FILES})
|
||||
wx_lib_link_libraries(wxxrc PRIVATE wxhtml wxxml)
|
||||
|
||||
wx_finalize_lib(xrc)
|
||||
wx_finalize_lib(wxxrc)
|
||||
|
@@ -8,6 +8,8 @@
|
||||
#############################################################################
|
||||
|
||||
if(wxUSE_ZLIB STREQUAL "builtin")
|
||||
# TODO: implement building zlib via its CMake file, using
|
||||
# add_subdirectory or ExternalProject_Add
|
||||
wx_add_builtin_library(wxzlib
|
||||
src/zlib/adler32.c
|
||||
src/zlib/compress.c
|
||||
|
@@ -37,7 +37,7 @@ if(NOT wxBUILD_CUSTOM_SETUP_HEADER_PATH)
|
||||
include(build/cmake/setup.cmake)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
if(NOT MSVC)
|
||||
# Write wx-config
|
||||
include(build/cmake/config.cmake)
|
||||
endif()
|
||||
|
30
build/cmake/modules/FindFONTCONFIG.cmake
Normal file
30
build/cmake/modules/FindFONTCONFIG.cmake
Normal file
@@ -0,0 +1,30 @@
|
||||
# - Try to find Fontconfig
|
||||
# Once done this will define
|
||||
#
|
||||
# FONTCONFIG_FOUND - system has Fontconfig
|
||||
# FONTCONFIG_INCLUDE_DIRS - The include directory to use for the Fontconfig headers
|
||||
# FONTCONFIG_LIBRARIES - Link these to use Fontconfig
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_FONTCONFIG QUIET fontconfig)
|
||||
|
||||
find_path(FONTCONFIG_INCLUDE_DIRS
|
||||
NAMES fontconfig.h
|
||||
HINTS ${PC_FONTCONFIG_INCLUDEDIR}
|
||||
${PC_FONTCONFIG_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES fontconfig
|
||||
)
|
||||
|
||||
find_library(FONTCONFIG_LIBRARIES
|
||||
NAMES fontconfig
|
||||
HINTS ${PC_FONTCONFIG_LIBDIR}
|
||||
${PC_FONTCONFIG_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FONTCONFIG DEFAULT_MSG FONTCONFIG_INCLUDE_DIRS FONTCONFIG_LIBRARIES)
|
||||
|
||||
mark_as_advanced(
|
||||
FONTCONFIG_INCLUDE_DIRS
|
||||
FONTCONFIG_LIBRARIES
|
||||
)
|
@@ -1,69 +0,0 @@
|
||||
# - Try to find the Fontconfig
|
||||
# Once done this will define
|
||||
#
|
||||
# FONTCONFIG_FOUND - system has Fontconfig
|
||||
# FONTCONFIG_INCLUDE_DIR - The include directory to use for the fontconfig headers
|
||||
# FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG
|
||||
# FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG
|
||||
|
||||
# Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
if (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
|
||||
|
||||
# in cache already
|
||||
set(FONTCONFIG_FOUND TRUE)
|
||||
|
||||
else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
|
||||
|
||||
if (NOT WIN32)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_FONTCONFIG QUIET fontconfig)
|
||||
|
||||
set(FONTCONFIG_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER})
|
||||
endif (NOT WIN32)
|
||||
|
||||
find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h
|
||||
PATHS
|
||||
${PC_FONTCONFIG_INCLUDEDIR}
|
||||
${PC_FONTCONFIG_INCLUDE_DIRS}
|
||||
/usr/X11/include
|
||||
)
|
||||
|
||||
find_library(FONTCONFIG_LIBRARIES NAMES fontconfig
|
||||
PATHS
|
||||
${PC_FONTCONFIG_LIBDIR}
|
||||
${PC_FONTCONFIG_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR )
|
||||
|
||||
mark_as_advanced(FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR)
|
||||
|
||||
endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
|
90
build/cmake/modules/FindGNOMEVFS2.cmake
Normal file
90
build/cmake/modules/FindGNOMEVFS2.cmake
Normal file
@@ -0,0 +1,90 @@
|
||||
# - Try to find GnomeVFS2
|
||||
# Once done this will define
|
||||
#
|
||||
# GNOMEVFS2_FOUND - system has GnomeVFS2
|
||||
# GNOMEVFS2_INCLUDE_DIRS - the GnomeVFS2 include directory
|
||||
# GNOMEVFS2_LIBRARIES - Link these to use GnomeVFS2
|
||||
# GNOMEVFS2_DEFINITIONS - Compiler switches required for using GnomeVFS2
|
||||
#
|
||||
# Copyright (c) 2008 Joshua L. Blocher <verbalshadow@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the New
|
||||
# BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
|
||||
|
||||
if (GNOMEVFS2_LIBRARIES AND GNOMEVFS2_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
set(GNOMEVFS2_FOUND TRUE)
|
||||
else (GNOMEVFS2_LIBRARIES AND GNOMEVFS2_INCLUDE_DIRS)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
include(UsePkgConfig)
|
||||
pkgconfig(gnome-vfs-2.0 _GNOMEVFS2_INCLUDEDIR _GNOMEVFS2_LIBDIR _GNOMEVFS2_LDFLAGS _GNOMEVFS2_CFLAGS)
|
||||
else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_GNOMEVFS2 gnome-vfs-2.0)
|
||||
endif (PKG_CONFIG_FOUND)
|
||||
endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
find_path(GNOMEVFS2_INCLUDE_DIR
|
||||
NAMES
|
||||
libgnomevfs/gnome-vfs.h
|
||||
PATHS
|
||||
${_GNOMEVFS2_INCLUDEDIR}
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
/sw/include
|
||||
$ENV{DEVLIBS_PATH}//include//
|
||||
PATH_SUFFIXES
|
||||
gnome-vfs-2.0
|
||||
)
|
||||
|
||||
find_library(GNOMEVFS-2_LIBRARY
|
||||
NAMES
|
||||
gnomevfs-2
|
||||
PATHS
|
||||
${_GNOMEVFS2_LIBDIR}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/sw/lib
|
||||
)
|
||||
|
||||
if (GNOMEVFS-2_LIBRARY)
|
||||
set(GNOMEVFS-2_FOUND TRUE)
|
||||
endif (GNOMEVFS-2_LIBRARY)
|
||||
|
||||
set(GNOMEVFS2_INCLUDE_DIRS
|
||||
${GNOMEVFS2_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
if (GNOMEVFS-2_FOUND)
|
||||
set(GNOMEVFS2_LIBRARIES
|
||||
${GNOMEVFS2_LIBRARIES}
|
||||
${GNOMEVFS-2_LIBRARY}
|
||||
)
|
||||
endif (GNOMEVFS-2_FOUND)
|
||||
|
||||
if (GNOMEVFS2_INCLUDE_DIRS AND GNOMEVFS2_LIBRARIES)
|
||||
set(GNOMEVFS2_FOUND TRUE)
|
||||
endif (GNOMEVFS2_INCLUDE_DIRS AND GNOMEVFS2_LIBRARIES)
|
||||
|
||||
if (GNOMEVFS2_FOUND)
|
||||
if (NOT GNOMEVFS2_FIND_QUIETLY)
|
||||
message(STATUS "Found GnomeVFS2: ${GNOMEVFS2_LIBRARIES}")
|
||||
endif (NOT GNOMEVFS2_FIND_QUIETLY)
|
||||
else (GNOMEVFS2_FOUND)
|
||||
if (GnomeVFS2_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find GnomeVFS2")
|
||||
endif (GNOMEVFS2_FIND_REQUIRED)
|
||||
endif (GNOMEVFS2_FOUND)
|
||||
|
||||
# show the GNOMEVFS2_INCLUDE_DIRS and GNOMEVFS2_LIBRARIES variables only in the advanced view
|
||||
mark_as_advanced(GNOMEVFS2_INCLUDE_DIRS GNOMEVFS2_LIBRARIES)
|
||||
|
||||
endif (GNOMEVFS2_LIBRARIES AND GNOMEVFS2_INCLUDE_DIRS)
|
||||
|
@@ -51,7 +51,7 @@ find_package(PkgConfig)
|
||||
|
||||
# Determine the version in the library name, default is 1.0
|
||||
set(GST_LIB_VERSION 1.0)
|
||||
if(DEFINED GStreamer_FIND_VERSION AND GStreamer_FIND_VERSION VERSION_LESS 1.0)
|
||||
if(DEFINED GSTREAMER_FIND_VERSION AND GSTREAMER_FIND_VERSION VERSION_LESS 1.0)
|
||||
set(GST_LIB_VERSION 0.10)
|
||||
endif()
|
||||
|
||||
@@ -120,7 +120,7 @@ FIND_GSTREAMER_COMPONENT(GSTREAMER_PLAYER gstreamer-player gst/player/player.h g
|
||||
# ------------------------------------------------
|
||||
set(_GSTREAMER_REQUIRED_VARS GSTREAMER_VERSION GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES)
|
||||
|
||||
foreach (_component ${GStreamer_FIND_COMPONENTS})
|
||||
foreach (_component ${GSTREAMER_FIND_COMPONENTS})
|
||||
set(_gst_component "GSTREAMER_${_component}")
|
||||
string(TOUPPER ${_gst_component} _UPPER_NAME)
|
||||
|
||||
@@ -128,4 +128,4 @@ foreach (_component ${GStreamer_FIND_COMPONENTS})
|
||||
endforeach ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GStreamer DEFAULT_MSG ${_GSTREAMER_REQUIRED_VARS})
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSTREAMER DEFAULT_MSG ${_GSTREAMER_REQUIRED_VARS})
|
@@ -42,5 +42,9 @@ set(VERSION_OK FALSE)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
# Check for GDK Wayland support
|
||||
include(CheckSymbolExists)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${GTK3_INCLUDE_DIRS})
|
||||
check_symbol_exists(GDK_WINDOWING_WAYLAND "gdk/gdk.h" wxHAVE_GDK_WAYLAND)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK3 DEFAULT_MSG GTK3_INCLUDE_DIRS GTK3_LIBRARIES VERSION_OK)
|
||||
|
46
build/cmake/modules/FindGTK4.cmake
Normal file
46
build/cmake/modules/FindGTK4.cmake
Normal file
@@ -0,0 +1,46 @@
|
||||
# - Try to find GTK+ 4
|
||||
# Once done, this will define
|
||||
#
|
||||
# GTK4_FOUND - system has GTK+ 4.
|
||||
# GTK4_INCLUDE_DIRS - the GTK+ 4. include directories
|
||||
# GTK4_LIBRARIES - link these to use GTK+ 4.
|
||||
#
|
||||
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
|
||||
# Copyright (C) 2013 Igalia S.L.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
|
||||
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(GTK4 QUIET gtk4)
|
||||
set(VERSION_OK TRUE)
|
||||
if (GTK4_VERSION)
|
||||
if (GTK4_FIND_VERSION_EXACT)
|
||||
if (NOT("${GTK4_FIND_VERSION}" VERSION_EQUAL "${GTK4_VERSION}"))
|
||||
set(VERSION_OK FALSE)
|
||||
endif ()
|
||||
else ()
|
||||
if ("${GTK4_VERSION}" VERSION_LESS "${GTK4_FIND_VERSION}")
|
||||
set(VERSION_OK FALSE)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK4 DEFAULT_MSG GTK4_INCLUDE_DIRS GTK4_LIBRARIES VERSION_OK)
|
@@ -25,6 +25,7 @@ ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
|
||||
|
||||
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
|
||||
set(CMAKE_REQUIRED_QUIET ON)
|
||||
IF(ICONV_FOUND)
|
||||
check_cxx_source_compiles("
|
||||
#include <iconv.h>
|
||||
@@ -41,15 +42,16 @@ IF(ICONV_FOUND)
|
||||
ENDIF(ICONV_FOUND)
|
||||
set(CMAKE_REQUIRED_INCLUDES)
|
||||
set(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CMAKE_REQUIRED_QUIET)
|
||||
|
||||
IF(ICONV_FOUND)
|
||||
IF(NOT ICONV_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}")
|
||||
ENDIF(NOT ICONV_FIND_QUIETLY)
|
||||
ELSE(ICONV_FOUND)
|
||||
IF(Iconv_FIND_REQUIRED)
|
||||
IF(ICONV_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find Iconv")
|
||||
ENDIF(Iconv_FIND_REQUIRED)
|
||||
ENDIF(ICONV_FIND_REQUIRED)
|
||||
ENDIF(ICONV_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
55
build/cmake/modules/FindLIBNOTIFY.cmake
Normal file
55
build/cmake/modules/FindLIBNOTIFY.cmake
Normal file
@@ -0,0 +1,55 @@
|
||||
# - Try to find LibNotify
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# LIBNOTIFY_FOUND - LibNotify was found
|
||||
# LIBNOTIFY_INCLUDE_DIRS - the LibNotify include directories
|
||||
# LIBNOTIFY_LIBRARIES - link these to use LibNotify
|
||||
#
|
||||
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
|
||||
# Copyright (C) 2014 Collabora Ltd.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
|
||||
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(LIBNOTIFY QUIET libnotify)
|
||||
|
||||
find_path(LIBNOTIFY_INCLUDE_DIRS
|
||||
NAMES notify.h
|
||||
HINTS ${LIBNOTIFY_INCLUDEDIR}
|
||||
${LIBNOTIFY_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES libnotify
|
||||
)
|
||||
|
||||
find_library(LIBNOTIFY_LIBRARIES
|
||||
NAMES notify
|
||||
HINTS ${LIBNOTIFY_LIBDIR}
|
||||
${LIBNOTIFY_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBNOTIFY REQUIRED_VARS LIBNOTIFY_INCLUDE_DIRS LIBNOTIFY_LIBRARIES
|
||||
VERSION_VAR LIBNOTIFY_VERSION)
|
||||
|
||||
mark_as_advanced(
|
||||
LIBNOTIFY_INCLUDE_DIRS
|
||||
LIBNOTIFY_LIBRARIES
|
||||
)
|
@@ -50,7 +50,7 @@ if(PC_LIBSOUP_FOUND)
|
||||
endif()
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibSoup REQUIRED_VARS LIBSOUP_INCLUDE_DIRS LIBSOUP_LIBRARIES
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSOUP REQUIRED_VARS LIBSOUP_INCLUDE_DIRS LIBSOUP_LIBRARIES
|
||||
VERSION_VAR PC_LIBSOUP_VERSION)
|
||||
|
||||
mark_as_advanced(LIBSOUP_LIBRARIES LIBSOUP_INCLUDE_DIRS)
|
40
build/cmake/modules/FindMSPACK.cmake
Normal file
40
build/cmake/modules/FindMSPACK.cmake
Normal file
@@ -0,0 +1,40 @@
|
||||
## FindMSPACK.cmake
|
||||
##
|
||||
## Copyright (C) 2016 Christian Schenk
|
||||
##
|
||||
## This file is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published
|
||||
## by the Free Software Foundation; either version 2, or (at your
|
||||
## option) any later version.
|
||||
##
|
||||
## This file is distributed in the hope that it will be useful, but
|
||||
## WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this file; if not, write to the Free Software
|
||||
## Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
## USA.
|
||||
|
||||
find_path(MSPACK_INCLUDE_DIR
|
||||
NAMES
|
||||
mspack.h
|
||||
)
|
||||
|
||||
find_library(MSPACK_LIBRARY
|
||||
NAMES
|
||||
mspack
|
||||
)
|
||||
|
||||
find_package_handle_standard_args(MSPACK DEFAULT_MSG MSPACK_LIBRARY MSPACK_INCLUDE_DIR)
|
||||
|
||||
if(MSPACK_FOUND)
|
||||
set(MSPACK_INCLUDE_DIRS ${MSPACK_INCLUDE_DIR})
|
||||
set(MSPACK_LIBRARIES ${MSPACK_LIBRARY})
|
||||
else()
|
||||
set(MSPACK_INCLUDE_DIRS)
|
||||
set(MSPACK_LIBRARIES)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(MSPACK_LIBRARY MSPACK_INCLUDE_DIR)
|
30
build/cmake/modules/FindPANGOFT2.cmake
Normal file
30
build/cmake/modules/FindPANGOFT2.cmake
Normal file
@@ -0,0 +1,30 @@
|
||||
# - Try to find PangoFT2
|
||||
# Once done this will define
|
||||
#
|
||||
# PANGOFT2_FOUND - system has PangoFT2
|
||||
# PANGOFT2_INCLUDE_DIRS - The include directory to use for the PangoFT2 headers
|
||||
# PANGOFT2_LIBRARIES - Link these to use PangoFT2
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_PANGOFT2 QUIET pangoft2)
|
||||
|
||||
find_path(PANGOFT2_INCLUDE_DIRS
|
||||
NAMES pango-context.h
|
||||
HINTS ${PC_PANGOFT2_INCLUDEDIR}
|
||||
${PC_PANGOFT2_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES pango
|
||||
)
|
||||
|
||||
find_library(PANGOFT2_LIBRARIES
|
||||
NAMES pangoft2-1.0
|
||||
HINTS ${PC_PANGOFT2_LIBDIR}
|
||||
${PC_PANGOFT2_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PANGOFT2 REQUIRED_VARS PANGOFT2_INCLUDE_DIRS PANGOFT2_LIBRARIES)
|
||||
|
||||
mark_as_advanced(
|
||||
PANGOFT2_INCLUDE_DIRS
|
||||
PANGOFT2_LIBRARIES
|
||||
)
|
18
build/cmake/modules/FindWAYLANDEGL.cmake
Normal file
18
build/cmake/modules/FindWAYLANDEGL.cmake
Normal file
@@ -0,0 +1,18 @@
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(WAYLANDEGL QUIET wayland-egl)
|
||||
|
||||
set(VERSION_OK TRUE)
|
||||
if (WAYLANDEGL_VERSION)
|
||||
if (WAYLANDEGL_FIND_VERSION_EXACT)
|
||||
if (NOT("${WAYLANDEGL_FIND_VERSION}" VERSION_EQUAL "${WAYLANDEGL_VERSION}"))
|
||||
set(VERSION_OK FALSE)
|
||||
endif ()
|
||||
else ()
|
||||
if ("${WAYLANDEGL_VERSION}" VERSION_LESS "${WAYLANDEGL_FIND_VERSION}")
|
||||
set(VERSION_OK FALSE)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLANDEGL DEFAULT_MSG WAYLANDEGL_LIBRARIES VERSION_OK)
|
@@ -6,8 +6,8 @@
|
||||
# WEBKIT_FOUND - True if Webkit found.
|
||||
|
||||
SET(WEBKIT_VERSION 1.0)
|
||||
if(DEFINED Webkit_FIND_VERSION)
|
||||
SET(WEBKIT_VERSION ${Webkit_FIND_VERSION})
|
||||
if(DEFINED WEBKIT_FIND_VERSION)
|
||||
SET(WEBKIT_VERSION ${WEBKIT_FIND_VERSION})
|
||||
endif()
|
||||
|
||||
SET(WEBKIT_INCLUDE_DIR WEBKIT_INCLUDE_DIR-NOTFOUND)
|
@@ -9,6 +9,7 @@ SET( WEBKIT2_VERSION 4.0)
|
||||
|
||||
set(WEBKIT2_INCLUDE_DIR WEBKIT2_INCLUDE_DIR-NOTFOUND)
|
||||
set(WEBKIT2_LIBRARY WEBKIT2_LIBRARY-NOTFOUND)
|
||||
set(WEBKIT2_JS_LIBRARY WEBKIT2_JS_LIBRARY-NOTFOUND)
|
||||
set(WEBKIT2_LIBRARIES WEBKIT2_LIBRARIES-NOTFOUND)
|
||||
|
||||
FIND_PATH(WEBKIT2_INCLUDE_DIR webkit2/webkit2.h
|
||||
@@ -20,6 +21,11 @@ FIND_LIBRARY(WEBKIT2_LIBRARY
|
||||
NAMES ${WEBKIT2_NAMES}
|
||||
)
|
||||
|
||||
SET(WEBKIT2_JS_NAMES "javascriptcoregtk-${WEBKIT2_VERSION}")
|
||||
FIND_LIBRARY(WEBKIT2_JS_LIBRARY
|
||||
NAMES ${WEBKIT2_JS_NAMES}
|
||||
)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set WEBKIT2_FOUND to
|
||||
# TRUE if all listed variables are TRUE.
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
@@ -29,7 +35,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
||||
)
|
||||
|
||||
IF(WEBKIT2_FOUND)
|
||||
SET( WEBKIT2_LIBRARIES ${WEBKIT2_LIBRARY} )
|
||||
SET( WEBKIT2_LIBRARIES ${WEBKIT2_LIBRARY} ${WEBKIT2_JS_LIBRARY} )
|
||||
ELSE(WEBKIT2_FOUND)
|
||||
SET( WEBKIT2_LIBRARIES )
|
||||
ENDIF(WEBKIT2_FOUND)
|
51
build/cmake/modules/FindXTEST.cmake
Normal file
51
build/cmake/modules/FindXTEST.cmake
Normal file
@@ -0,0 +1,51 @@
|
||||
# - Find XTEST
|
||||
# Find the XTEST libraries
|
||||
#
|
||||
# This module defines the following variables:
|
||||
# XTEST_FOUND - true if XTEST_INCLUDE_DIR & XTEST_LIBRARY are found
|
||||
# XTEST_LIBRARIES - Set when XTEST_LIBRARY is found
|
||||
# XTEST_INCLUDE_DIRS - Set when XTEST_INCLUDE_DIR is found
|
||||
#
|
||||
# XTEST_INCLUDE_DIR - where to find XTest.h, etc.
|
||||
# XTEST_LIBRARY - the XTEST library
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 O.S. Systems Software Ltda.
|
||||
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
|
||||
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#=============================================================================
|
||||
|
||||
find_path(XTEST_INCLUDE_DIR NAMES X11/extensions/XTest.h
|
||||
PATH_SUFFIXES X11/extensions
|
||||
PATHS /opt/X11/include
|
||||
DOC "The XTest include directory"
|
||||
)
|
||||
|
||||
find_library(XTEST_LIBRARY NAMES Xtst
|
||||
PATHS /opt/X11/lib
|
||||
DOC "The XTest library"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XTEST DEFAULT_MSG XTEST_LIBRARY XTEST_INCLUDE_DIR)
|
||||
|
||||
if(XTEST_FOUND)
|
||||
set( XTEST_LIBRARIES ${XTEST_LIBRARY} )
|
||||
set( XTEST_INCLUDE_DIRS ${XTEST_INCLUDE_DIR} )
|
||||
endif()
|
||||
|
||||
mark_as_advanced(XTEST_INCLUDE_DIR XTEST_LIBRARY)
|
||||
|
@@ -1551,7 +1551,8 @@ function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flags
|
||||
endif()
|
||||
endif()
|
||||
elseif (_compilerID MATCHES "Clang")
|
||||
if (UNIX)
|
||||
get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
|
||||
if (NOT WIN32 OR NOT _compilerName MATCHES "cl$")
|
||||
# Clang options used
|
||||
# -H print the name of each header file used
|
||||
# -E invoke preprocessor
|
||||
@@ -1564,7 +1565,7 @@ function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flags
|
||||
# return as a flag string
|
||||
set (_flags "-H -E -fno-color-diagnostics -Xclang -Eonly")
|
||||
endif()
|
||||
elseif (WIN32)
|
||||
else()
|
||||
# Clang-cl.exe options used
|
||||
# /TC treat all files named on the command line as C source files
|
||||
# /TP treat all files named on the command line as C++ source files
|
||||
@@ -1671,7 +1672,8 @@ function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersio
|
||||
set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"")
|
||||
endif()
|
||||
elseif (_compilerID MATCHES "Clang")
|
||||
if (UNIX)
|
||||
get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
|
||||
if (NOT WIN32 OR NOT _compilerName MATCHES "cl$")
|
||||
# Clang options used
|
||||
# -x specify the source language
|
||||
# -c compile but do not link
|
||||
@@ -1692,7 +1694,7 @@ function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersio
|
||||
set (_flags "${_flags} -Xclang -fno-pch-timestamp")
|
||||
endif()
|
||||
endif()
|
||||
elseif (WIN32)
|
||||
else()
|
||||
# Clang-cl.exe options used
|
||||
# /Yc creates a precompiled header file
|
||||
# /Fp specifies precompiled header binary file name
|
||||
@@ -1830,7 +1832,8 @@ function (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerV
|
||||
set (_flags "-Winvalid-pch -include \"${_prefixFile}\"")
|
||||
endif()
|
||||
elseif (_compilerID MATCHES "Clang")
|
||||
if (UNIX)
|
||||
get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
|
||||
if (NOT WIN32 OR NOT _compilerName MATCHES "cl$")
|
||||
# Clang options used
|
||||
# -include process include file as the first line of the primary source file
|
||||
# note: ccache requires the -include flag to be used in order to process precompiled header correctly
|
||||
@@ -1841,7 +1844,7 @@ function (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerV
|
||||
# return as a flag string
|
||||
set (_flags "-include \"${_prefixFile}\"")
|
||||
endif()
|
||||
elseif (WIN32)
|
||||
else()
|
||||
# Clang-cl.exe options used
|
||||
# /Yu uses a precompiled header file during build
|
||||
# /Fp specifies precompiled header binary file name
|
||||
@@ -2006,15 +2009,12 @@ function (cotire_check_precompiled_header_support _language _target _msgVar)
|
||||
set (${_msgVar} "" PARENT_SCOPE)
|
||||
endif()
|
||||
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Clang")
|
||||
if (UNIX)
|
||||
get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
|
||||
if (NOT WIN32 OR NOT _compilerName MATCHES "cl$")
|
||||
# all Unix Clang versions have PCH support
|
||||
set (${_msgVar} "" PARENT_SCOPE)
|
||||
elseif (WIN32)
|
||||
# only clang-cl is supported under Windows
|
||||
get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
|
||||
if (NOT _compilerName MATCHES "cl$")
|
||||
set (${_msgVar} "${_unsupportedCompiler} version ${CMAKE_${_language}_COMPILER_VERSION}. Use clang-cl instead." PARENT_SCOPE)
|
||||
endif()
|
||||
else()
|
||||
# clang-cl under Windows
|
||||
endif()
|
||||
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Intel")
|
||||
# Intel PCH support requires version >= 8.0.0
|
||||
@@ -2381,8 +2381,9 @@ endfunction()
|
||||
|
||||
function (cotire_setup_pch_file_compilation _language _target _targetScript _prefixFile _pchFile _hostFile)
|
||||
set (_sourceFiles ${ARGN})
|
||||
get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
|
||||
if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" OR
|
||||
(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang"))
|
||||
(WIN32 AND _compilerName MATCHES "cl$"))
|
||||
# for MSVC, Intel and Clang-cl, we attach the precompiled header compilation to the host file
|
||||
# the remaining files include the precompiled header, see cotire_setup_pch_file_inclusion
|
||||
if (_sourceFiles)
|
||||
@@ -2428,8 +2429,9 @@ function (cotire_setup_pch_file_compilation _language _target _targetScript _pre
|
||||
endfunction()
|
||||
|
||||
function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefixFile _pchFile _hostFile)
|
||||
get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
|
||||
if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" OR
|
||||
(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang"))
|
||||
(WIN32 AND _compilerName MATCHES "cl$"))
|
||||
# for MSVC, Intel and clang-cl, we include the precompiled header in all but the host file
|
||||
# the host file does the precompiled header compilation, see cotire_setup_pch_file_compilation
|
||||
set (_sourceFiles ${ARGN})
|
||||
@@ -2578,8 +2580,9 @@ function (cotire_setup_target_pch_usage _languages _target _wholeTarget)
|
||||
set (_language "${_languages}")
|
||||
# for MSVC, Intel and clang-cl, precompiled header inclusion is always done on the source file level
|
||||
# see cotire_setup_pch_file_inclusion
|
||||
get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
|
||||
if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" AND NOT
|
||||
(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang"))
|
||||
(WIN32 AND _compilerName MATCHES "cl$"))
|
||||
get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER)
|
||||
if (_prefixFile)
|
||||
get_property(_pchFile TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER)
|
||||
@@ -3071,8 +3074,9 @@ function (cotire_setup_pch_target _languages _configurations _target)
|
||||
set (_dependsFiles "")
|
||||
foreach (_language ${_languages})
|
||||
set (_props COTIRE_${_language}_PREFIX_HEADER COTIRE_${_language}_UNITY_SOURCE)
|
||||
get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
|
||||
if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" AND NOT
|
||||
(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang"))
|
||||
(WIN32 AND _compilerName MATCHES "cl$"))
|
||||
# MSVC, Intel and clang-cl only create precompiled header as a side effect
|
||||
list (INSERT _props 0 COTIRE_${_language}_PRECOMPILED_HEADER)
|
||||
endif()
|
||||
|
21
build/cmake/modules/cotire_test/CMakeLists.txt
Normal file
21
build/cmake/modules/cotire_test/CMakeLists.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
# cotire example project
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
if (POLICY CMP0058)
|
||||
# Ninja requires custom command byproducts to be explicit
|
||||
cmake_policy(SET CMP0058 NEW)
|
||||
endif()
|
||||
|
||||
project (CotireExample)
|
||||
|
||||
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/..")
|
||||
|
||||
if (NOT CMAKE_VERSION VERSION_LESS "3.1.0")
|
||||
set (CMAKE_CXX_STANDARD "98")
|
||||
set (CMAKE_CXX_EXTENSIONS OFF)
|
||||
endif()
|
||||
|
||||
include(cotire)
|
||||
|
||||
add_subdirectory(src)
|
22
build/cmake/modules/cotire_test/license
Normal file
22
build/cmake/modules/cotire_test/license
Normal file
@@ -0,0 +1,22 @@
|
||||
Copyright (c) 2012-2018 Sascha Kratky
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
31
build/cmake/modules/cotire_test/src/CMakeLists.txt
Normal file
31
build/cmake/modules/cotire_test/src/CMakeLists.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
# cotire example project
|
||||
|
||||
add_executable(example main.cpp example.cpp log.cpp log.h example.h)
|
||||
|
||||
# enable warnings
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set_target_properties(example PROPERTIES COMPILE_FLAGS "-Weverything")
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
set_target_properties(example PROPERTIES COMPILE_FLAGS "-Wall -Wextra")
|
||||
endif()
|
||||
|
||||
cotire(example)
|
||||
|
||||
# cotire sets the following properties
|
||||
get_target_property(_unitySource example COTIRE_CXX_UNITY_SOURCE)
|
||||
get_target_property(_prefixHeader example COTIRE_CXX_PREFIX_HEADER)
|
||||
get_target_property(_precompiledHeader example COTIRE_CXX_PRECOMPILED_HEADER)
|
||||
get_target_property(_unityTargetName example COTIRE_UNITY_TARGET_NAME)
|
||||
|
||||
if (_unitySource)
|
||||
message(STATUS "example unity source: ${_unitySource}")
|
||||
endif()
|
||||
if (_prefixHeader)
|
||||
message(STATUS "example prefix header: ${_prefixHeader}")
|
||||
endif()
|
||||
if (_precompiledHeader)
|
||||
message(STATUS "example precompiled header: ${_precompiledHeader}")
|
||||
endif()
|
||||
if (TARGET ${_unityTargetName})
|
||||
message(STATUS "example unity target: ${_unityTargetName}")
|
||||
endif()
|
24
build/cmake/modules/cotire_test/src/example.cpp
Normal file
24
build/cmake/modules/cotire_test/src/example.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
// cotire example project
|
||||
|
||||
#include "example.h"
|
||||
|
||||
#ifndef NDEBUG
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#endif
|
||||
|
||||
namespace example {
|
||||
|
||||
std::string get_message() {
|
||||
char msg_chrs[] = { 'C', 'o', 't', 'i', 'r', 'e', 'd', '!' };
|
||||
#ifdef NDEBUG
|
||||
return std::string(&msg_chrs[0], &msg_chrs[sizeof(msg_chrs)]);
|
||||
#else
|
||||
std::string msg;
|
||||
msg.reserve(sizeof(msg_chrs));
|
||||
std::copy(msg_chrs, msg_chrs + sizeof(msg_chrs), std::back_inserter(msg));
|
||||
return msg;
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
10
build/cmake/modules/cotire_test/src/example.h
Normal file
10
build/cmake/modules/cotire_test/src/example.h
Normal file
@@ -0,0 +1,10 @@
|
||||
// cotire example project
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace example {
|
||||
|
||||
std::string get_message();
|
||||
|
||||
}
|
||||
|
17
build/cmake/modules/cotire_test/src/log.cpp
Normal file
17
build/cmake/modules/cotire_test/src/log.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
// cotire example project
|
||||
|
||||
#include "log.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace logging {
|
||||
|
||||
void error(const std::string& msg) {
|
||||
std::cerr << msg << std::endl;
|
||||
}
|
||||
|
||||
void info(const std::string& msg) {
|
||||
std::cout << msg << std::endl;
|
||||
}
|
||||
|
||||
}
|
10
build/cmake/modules/cotire_test/src/log.h
Normal file
10
build/cmake/modules/cotire_test/src/log.h
Normal file
@@ -0,0 +1,10 @@
|
||||
// cotire example project
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace logging {
|
||||
|
||||
void error(const std::string& msg);
|
||||
void info(const std::string& msg);
|
||||
|
||||
}
|
12
build/cmake/modules/cotire_test/src/main.cpp
Normal file
12
build/cmake/modules/cotire_test/src/main.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
// cotire example project main
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "example.h"
|
||||
#include "log.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
std::string msg = example::get_message();
|
||||
logging::info(msg);
|
||||
}
|
@@ -23,29 +23,54 @@ wx_option(wxBUILD_COMPATIBILITY
|
||||
set(wxBUILD_CUSTOM_SETUP_HEADER_PATH "" CACHE PATH "Include path containing custom wx/setup.h")
|
||||
mark_as_advanced(wxBUILD_CUSTOM_SETUP_HEADER_PATH)
|
||||
|
||||
if(WIN32)
|
||||
wx_option(wxUSE_DPI_AWARE_MANIFEST "DPI Awareness" "per-monitor" STRINGS "none" "system" "per-monitor")
|
||||
endif()
|
||||
|
||||
wx_option(wxBUILD_DEBUG_LEVEL "Debug Level" Default STRINGS Default 0 1 2)
|
||||
mark_as_advanced(wxBUILD_DEBUG_LEVEL)
|
||||
|
||||
if(MSVC)
|
||||
if(NOT APPLE)
|
||||
wx_option(wxBUILD_USE_STATIC_RUNTIME "Link using the static runtime library" OFF)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
wx_option(wxBUILD_MSVC_MULTIPROC "Enable multi-processor compilation for MSVC")
|
||||
else()
|
||||
# Other compilers support setting the C++ standard, present it an option to the user
|
||||
endif()
|
||||
|
||||
if(NOT MSVC OR MSVC_VERSION GREATER 1800)
|
||||
# support setting the C++ standard, present it an option to the user
|
||||
if(DEFINED CMAKE_CXX_STANDARD)
|
||||
set(wxCXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD})
|
||||
else()
|
||||
set(wxCXX_STANDARD_DEFAULT COMPILER_DEFAULT)
|
||||
endif()
|
||||
wx_option(wxBUILD_CXX_STANDARD "C++ standard used to build wxWidgets targets"
|
||||
${wxCXX_STANDARD_DEFAULT} STRINGS COMPILER_DEFAULT 98 11 14 17)
|
||||
${wxCXX_STANDARD_DEFAULT} STRINGS COMPILER_DEFAULT 98 11 14 17 20)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(wxBUILD_VENDOR "custom" CACHE STRING "Short string identifying your company (used in DLL name)")
|
||||
endif()
|
||||
set(wxBUILD_FLAVOUR "" CACHE STRING "Specify a name to identify the build")
|
||||
mark_as_advanced(wxBUILD_FLAVOUR)
|
||||
|
||||
wx_option(wxBUILD_OPTIMISE "use speed-optimised C/C++ compiler flags for release build" OFF)
|
||||
mark_as_advanced(wxBUILD_OPTIMISE)
|
||||
if(MSVC)
|
||||
set(wxBUILD_STRIPPED_RELEASE_DEFAULT OFF)
|
||||
else()
|
||||
set(wxBUILD_STRIPPED_RELEASE_DEFAULT ON)
|
||||
endif()
|
||||
wx_option(wxBUILD_STRIPPED_RELEASE "remove debug symbols in release build" ${wxBUILD_STRIPPED_RELEASE_DEFAULT})
|
||||
mark_as_advanced(wxBUILD_STRIPPED_RELEASE)
|
||||
wx_option(wxBUILD_PIC "Enable position independent code (PIC)." ON)
|
||||
mark_as_advanced(wxBUILD_PIC)
|
||||
wx_option(wxUSE_NO_RTTI "disable RTTI support" OFF)
|
||||
|
||||
# STL options
|
||||
wx_option(wxUSE_STL "use standard C++ classes for everything" OFF)
|
||||
set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_STL "use C++ STL classes")
|
||||
wx_dependent_option(wxUSE_STD_CONTAINERS "use standard C++ container classes" ON "wxUSE_STL" OFF)
|
||||
|
||||
wx_option(wxUSE_UNICODE "compile with Unicode support (NOT RECOMMENDED to be turned off)")
|
||||
@@ -55,7 +80,9 @@ if(NOT WIN32)
|
||||
endif()
|
||||
|
||||
wx_option(wxUSE_COMPILER_TLS "enable use of compiler TLS support")
|
||||
wx_option(wxUSE_VISIBILITY "use of ELF symbols visibility")
|
||||
if(NOT WIN32)
|
||||
wx_option(wxUSE_VISIBILITY "use of ELF symbols visibility")
|
||||
endif()
|
||||
wx_option(wxUSE_UNSAFE_WXSTRING_CONV "provide unsafe implicit conversions in wxString to const char* or std::string")
|
||||
wx_option(wxUSE_REPRODUCIBLE_BUILD "enable reproducable build" OFF)
|
||||
|
||||
@@ -74,10 +101,18 @@ wx_option(wxUSE_LIBLZMA "use LZMA compression" OFF)
|
||||
set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_LIBLZMA "use liblzma for LZMA compression")
|
||||
|
||||
wx_option(wxUSE_OPENGL "use OpenGL (or Mesa)")
|
||||
wx_option(wxUSE_LIBSDL "use SDL for audio on Unix")
|
||||
|
||||
if(NOT WIN32)
|
||||
if(UNIX)
|
||||
wx_option(wxUSE_LIBSDL "use SDL for audio on Unix")
|
||||
wx_option(wxUSE_LIBICONV "use libiconv (character conversion)")
|
||||
wx_option(wxUSE_LIBNOTIFY "use libnotify for notifications")
|
||||
wx_option(wxUSE_XTEST "use XTest extension")
|
||||
wx_option(wxUSE_LIBMSPACK "use libmspack (CHM help files loading)")
|
||||
wx_option(wxUSE_LIBGNOMEVFS "use GNOME VFS for associating MIME types")
|
||||
wx_option(wxUSE_GLCANVAS_EGL "use EGL backend for wxGLCanvas")
|
||||
|
||||
set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_LIBSDL "use SDL for audio on Unix")
|
||||
set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_LIBMSPACK "use libmspack (CHM help files loading)")
|
||||
endif()
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -182,6 +217,7 @@ if(WIN32)
|
||||
endif()
|
||||
wx_option(wxUSE_DBGHELP "use dbghelp.dll API" ${wxUSE_DBGHELP_DEFAULT})
|
||||
wx_option(wxUSE_INICONF "use wxIniConfig")
|
||||
wx_option(wxUSE_WINSOCK2 "include <winsock2.h> rather than <winsock.h>" OFF)
|
||||
wx_option(wxUSE_REGKEY "use wxRegKey class")
|
||||
endif()
|
||||
|
||||
@@ -277,8 +313,9 @@ wx_option(wxUSE_COMBOBOX "use wxComboBox class")
|
||||
wx_option(wxUSE_COMBOCTRL "use wxComboCtrl class")
|
||||
wx_option(wxUSE_COMMANDLINKBUTTON "use wxCommmandLinkButton class")
|
||||
wx_option(wxUSE_DATAVIEWCTRL "use wxDataViewCtrl class")
|
||||
wx_option(wxUSE_NATIVE_DATAVIEWCTRL "use the native wxDataViewCtrl if available")
|
||||
wx_option(wxUSE_DATEPICKCTRL "use wxDatePickerCtrl class")
|
||||
wx_option(wxUSE_DETECT_SM "_sm use code to detect X11 session manager")
|
||||
wx_option(wxUSE_DETECT_SM "use code to detect X11 session manager" OFF)
|
||||
wx_option(wxUSE_DIRPICKERCTRL "use wxDirPickerCtrl class")
|
||||
wx_option(wxUSE_DISPLAY "use wxDisplay class")
|
||||
wx_option(wxUSE_EDITABLELISTBOX "use wxEditableListBox class")
|
||||
@@ -360,7 +397,8 @@ wx_option(wxUSE_WIZARDDLG "use wxWizard")
|
||||
# misc GUI options
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
wx_option(wxUSE_MENUS "use wxMenu/wxMenuBar/wxMenuItem classes")
|
||||
wx_option(wxUSE_MENUS "use wxMenu and wxMenuItem classes")
|
||||
wx_option(wxUSE_MENUBAR "use wxMenuBar class")
|
||||
wx_option(wxUSE_MINIFRAME "use wxMiniFrame class")
|
||||
wx_option(wxUSE_TOOLTIPS "use wxToolTip class")
|
||||
wx_option(wxUSE_SPLINES "use spline drawing code")
|
||||
@@ -410,6 +448,7 @@ if(WIN32)
|
||||
wx_option(wxUSE_TASKBARICON_BALLOONS "enable wxTaskBarIcon::ShowBalloon() method (Win32 only)")
|
||||
wx_option(wxUSE_UXTHEME "enable support for Windows XP themed look (Win32 only)")
|
||||
wx_option(wxUSE_WEBVIEW_IE "use wxWebView IE backend (Win32 only)")
|
||||
wx_option(wxUSE_WEBVIEW_EDGE "use wxWebView Edge (Chromium) backend (Windows 7+ only)" OFF)
|
||||
wx_option(wxUSE_WXDIB "use wxDIB class (Win32 only)")
|
||||
if(MSVC_VERSION GREATER 1600 AND NOT CMAKE_VS_PLATFORM_TOOLSET MATCHES "_xp$")
|
||||
set(wxUSE_WINRT_DEFAULT ON)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#############################################################################
|
||||
# Name: CMakeLists.txt
|
||||
# Name: build/cmake/policies.cmake
|
||||
# Purpose: CMake policies for wxWidgets
|
||||
# Author: Tobias Taschner
|
||||
# Created: 2016-10-21
|
||||
@@ -10,12 +10,17 @@
|
||||
# Please keep the policies in the order of their numbers.
|
||||
|
||||
if(POLICY CMP0025)
|
||||
# Compiler id for Apple Clang is now AppleClang
|
||||
# Compiler id for Apple Clang is now AppleClang.
|
||||
cmake_policy(SET CMP0025 NEW)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0028)
|
||||
# Double colon in target name means ALIAS or IMPORTED target.
|
||||
cmake_policy(SET CMP0028 NEW)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0038)
|
||||
# targets may not link directly to themselves
|
||||
# Targets may not link directly to themselves.
|
||||
cmake_policy(SET CMP0038 NEW)
|
||||
endif()
|
||||
|
||||
@@ -25,27 +30,32 @@ if(POLICY CMP0042)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0045)
|
||||
# error on non-existent target in get_target_property
|
||||
# Error on non-existent target in get_target_property.
|
||||
cmake_policy(SET CMP0045 NEW)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0046)
|
||||
# error on non-existent dependency in add_dependencies
|
||||
# Error on non-existent dependency in add_dependencies.
|
||||
cmake_policy(SET CMP0046 NEW)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0048)
|
||||
# The project() command manages VERSION variables.
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0049)
|
||||
# do not expand variables in target source entries
|
||||
# Do not expand variables in target source entries.
|
||||
cmake_policy(SET CMP0049 NEW)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0053)
|
||||
# simplify variable reference and escape sequence evaluation
|
||||
# Simplify variable reference and escape sequence evaluation.
|
||||
cmake_policy(SET CMP0053 NEW)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0054)
|
||||
# only interpret if() arguments as variables or keywords when unquoted
|
||||
# Only interpret if() arguments as variables or keywords when unquoted.
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
endif()
|
||||
|
||||
@@ -58,3 +68,8 @@ if(POLICY CMP0072)
|
||||
# FindOpenGL prefers GLVND by default when available.
|
||||
cmake_policy(SET CMP0072 NEW)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0092)
|
||||
# MSVC warning flags are not in CMAKE_<LANG>_FLAGS by default.
|
||||
cmake_policy(SET CMP0092 NEW)
|
||||
endif()
|
||||
|
@@ -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(archive CONSOLE)
|
||||
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(caret DEPENDS wxUSE_CARET)
|
||||
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(dataview IMPORTANT dataview.cpp mymodels.cpp mymodels.h DEPENDS wxUSE_DATAVIEWCTRL)
|
||||
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()
|
||||
set(SAMPLE_DIALOGS_SRC dialogs.cpp dialogs.h)
|
||||
if(NOT wxBUILD_SHARED AND (WXMSW OR APPLE)) # AND NOT WXUNIV
|
||||
@@ -34,17 +34,17 @@ if(WXGTK2)
|
||||
wx_list_add_prefix(SAMPLE_DIALOGS_SRC ../../src/generic/ filedlgg.cpp)
|
||||
endif()
|
||||
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(display DEPENDS wxUSE_DISPLAY)
|
||||
wx_add_sample(dialup nettest.cpp LIBRARIES wxnet DEPENDS wxUSE_DIALUP_MANAGER)
|
||||
wx_add_sample(display)
|
||||
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
|
||||
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
|
||||
DATA backgrnd.png shape01.png shape02.png shape03.png
|
||||
DEPENDS wxUSE_DRAGIMAGE)
|
||||
wx_add_sample(drawing DATA pat4.bmp pat35.bmp pat36.bmp image.bmp mask.bmp)
|
||||
wx_add_sample(drawing DATA pat4.bmp pat35.bmp pat36.bmp image.bmp mask.bmp NAME drawingsample)
|
||||
wx_add_sample(erase)
|
||||
wx_add_sample(event event.cpp gestures.cpp gestures.h)
|
||||
wx_add_sample(event event.cpp gestures.cpp gestures.h chessboard.cpp chessboard.h)
|
||||
wx_add_sample(except DEPENDS wxUSE_EXCEPTIONS)
|
||||
wx_add_sample(exec)
|
||||
wx_add_sample(font DATA wxprivate.ttf)
|
||||
@@ -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
|
||||
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
|
||||
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
|
||||
@@ -63,7 +63,7 @@ wx_add_sample(help demo.cpp LIBRARIES html
|
||||
NAME helpdemo
|
||||
DEPENDS wxUSE_HELP
|
||||
)
|
||||
wx_add_sample(htlbox LIBRARIES html DEPENDS wxUSE_HTML)
|
||||
wx_add_sample(htlbox LIBRARIES wxhtml DEPENDS wxUSE_HTML)
|
||||
if(wxUSE_HTML)
|
||||
include(html.cmake)
|
||||
endif()
|
||||
@@ -71,42 +71,42 @@ wx_add_sample(image image.cpp canvas.cpp canvas.h cursor_png.c RES image.rc
|
||||
DATA horse.png horse.jpg horse.bmp horse.gif horse.pcx horse.pnm
|
||||
horse_ag.pnm horse_rg.pnm horse.tif horse.tga horse.xpm horse.cur
|
||||
horse.ico horse3.ani smile.xbm toucan.png cmyk.jpg cursor.png
|
||||
DEPENDS wxUSE_IMAGE)
|
||||
NAME imagesample DEPENDS wxUSE_IMAGE)
|
||||
foreach(lang ar bg cs de fr it ka pl ru sv ja ja_JP.EUC-JP)
|
||||
list(APPEND INTERNAT_DATA_FILES ${lang}/internat.po ${lang}/internat.mo)
|
||||
endforeach()
|
||||
wx_add_sample(internat DATA ${INTERNAT_DATA_FILES} DEPENDS wxUSE_INTL)
|
||||
# IPC samples
|
||||
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 server.cpp server.h connection.h ipcsetup.h NAME ipcserver LIBRARIES net 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 baseserver.cpp connection.h ipcsetup.h NAME baseipcserver 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 wxnet 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 wxnet DEPENDS wxUSE_IPC)
|
||||
set(wxSAMPLE_FOLDER)
|
||||
wx_add_sample(joytest joytest.cpp joytest.h DATA buttonpress.wav DEPENDS wxUSE_JOYSTICK)
|
||||
wx_add_sample(keyboard)
|
||||
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(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(menu DEPENDS wxUSE_MENUS)
|
||||
wx_add_sample(menu DEPENDS wxUSE_MENUS wxUSE_MENUBAR)
|
||||
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)
|
||||
set(wxSAMPLE_SUBDIR opengl/)
|
||||
set(wxSAMPLE_FOLDER OpenGL)
|
||||
wx_add_sample(cube cube.cpp cube.h LIBRARIES gl)
|
||||
wx_add_sample(isosurf isosurf.cpp isosurf.h LIBRARIES gl DATA isosurf.dat.gz)
|
||||
wx_add_sample(cube cube.cpp cube.h LIBRARIES wxgl)
|
||||
wx_add_sample(isosurf isosurf.cpp isosurf.h LIBRARIES wxgl DATA isosurf.dat.gz)
|
||||
wx_add_sample(penguin
|
||||
penguin.cpp dxfrenderer.cpp trackball.c
|
||||
dxfrenderer.h penguin.h trackball.h
|
||||
LIBRARIES gl
|
||||
LIBRARIES wxgl
|
||||
DATA penguin.dxf.gz)
|
||||
wx_add_sample(pyramid
|
||||
pyramid.cpp oglstuff.cpp mathstuff.cpp oglpfuncs.cpp
|
||||
pyramid.h oglstuff.h mathstuff.h oglpfuncs.h
|
||||
LIBRARIES gl)
|
||||
LIBRARIES wxgl)
|
||||
set(wxSAMPLE_SUBDIR)
|
||||
set(wxSAMPLE_FOLDER)
|
||||
endif()
|
||||
@@ -116,30 +116,30 @@ wx_add_sample(power)
|
||||
wx_add_sample(preferences DEPENDS wxUSE_PREFERENCES_EDITOR)
|
||||
wx_add_sample(printing printing.cpp printing.h DEPENDS wxUSE_PRINTING_ARCHITECTURE)
|
||||
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 DLL renddll.cpp NAME renddll FOLDER render)
|
||||
wx_add_sample(ribbon ribbondemo.cpp LIBRARIES ribbon NAME ribbondemo DEPENDS wxUSE_RIBBON)
|
||||
wx_add_sample(richtext LIBRARIES richtext html xml NAME richtextdemo DEPENDS wxUSE_XML wxUSE_RICHTEXT)
|
||||
wx_add_sample(ribbon ribbondemo.cpp LIBRARIES wxribbon NAME ribbondemo DEPENDS wxUSE_RIBBON)
|
||||
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(scroll)
|
||||
wx_add_sample(secretstore CONSOLE DEPENDS wxUSE_SECRETSTORE)
|
||||
wx_add_sample(shaped DATA star.png)
|
||||
if(wxUSE_SOCKETS)
|
||||
wx_add_sample(sockets client.cpp NAME client LIBRARIES net FOLDER sockets)
|
||||
wx_add_sample(sockets server.cpp NAME server LIBRARIES net FOLDER sockets)
|
||||
wx_add_sample(sockets CONSOLE baseclient.cpp NAME baseclient LIBRARIES net FOLDER sockets)
|
||||
wx_add_sample(sockets CONSOLE baseserver.cpp NAME baseserver 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 wxnet 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 wxnet FOLDER sockets)
|
||||
endif()
|
||||
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)
|
||||
if(TARGET splash AND wxUSE_MEDIACTRL)
|
||||
wx_exe_link_libraries(splash media)
|
||||
wx_exe_link_libraries(splash wxmedia)
|
||||
endif()
|
||||
wx_add_sample(splitter DEPENDS wxUSE_SPLITTER)
|
||||
wx_add_sample(statbar DEPENDS wxUSE_STATUSBAR)
|
||||
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(taborder)
|
||||
wx_add_sample(taskbar tbtest.cpp tbtest.h DEPENDS wxUSE_TASKBARICON)
|
||||
@@ -152,9 +152,10 @@ wx_add_sample(typetest typetest.cpp typetest.h)
|
||||
wx_add_sample(uiaction DEPENDS wxUSE_UIACTIONSIMULATOR)
|
||||
wx_add_sample(validate validate.cpp validate.h DEPENDS wxUSE_VALIDATORS)
|
||||
wx_add_sample(vscroll vstest.cpp)
|
||||
wx_add_sample(webview LIBRARIES webview NAME webviewsample DEPENDS wxUSE_WEBVIEW)
|
||||
wx_add_sample(webview LIBRARIES wxwebview DATA ../help/doc.zip:doc.zip
|
||||
NAME webviewsample DEPENDS wxUSE_WEBVIEW)
|
||||
if(TARGET webviewsample AND wxUSE_STC)
|
||||
wx_exe_link_libraries(webviewsample stc)
|
||||
wx_exe_link_libraries(webviewsample wxstc)
|
||||
endif()
|
||||
wx_add_sample(webrequest LIBRARIES net DEPENDS wxUSE_WEBREQUEST)
|
||||
# widgets Sample
|
||||
@@ -214,7 +215,7 @@ wx_list_add_prefix(WIDGETS_RC_FILES icons/
|
||||
stattext.xpm text.xpm timepick.xpm toggle.xpm
|
||||
)
|
||||
wx_add_sample(widgets IMPORTANT ${SAMPLE_WIDGETS_SRC}
|
||||
DATA ${WIDGETS_RC_FILES} textctrl.cpp
|
||||
DATA ${WIDGETS_RC_FILES} textctrl.cpp ../image/toucan.png:toucan.png
|
||||
)
|
||||
wx_add_sample(wizard DEPENDS wxUSE_WIZARDDLG)
|
||||
wx_add_sample(wrapsizer)
|
||||
@@ -245,12 +246,12 @@ wx_add_sample(xrc
|
||||
custclas.h
|
||||
objrefdlg.h
|
||||
DATA ${XRC_RC_FILES}
|
||||
LIBRARIES aui ribbon xrc html
|
||||
LIBRARIES wxaui wxribbon wxxrc wxhtml
|
||||
NAME xrcdemo
|
||||
DEPENDS wxUSE_XML wxUSE_XRC
|
||||
)
|
||||
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)
|
||||
|
||||
if(WIN32)
|
||||
@@ -263,10 +264,12 @@ if(WIN32)
|
||||
if(NOT wxBUILD_SHARED)
|
||||
# this test only makes sense with statically built wx, otherwise
|
||||
# the same copy of wx would be used
|
||||
wx_add_sample(dll wx_exe.cpp my_dll.h NAME wx_exe FOLDER dll LIBRARIES my_dll)
|
||||
wx_add_sample(dll wx_exe.cpp my_dll.h NAME wx_exe FOLDER dll)
|
||||
wx_link_sample_libraries(wx_exe my_dll)
|
||||
endif()
|
||||
|
||||
wx_add_sample(dll sdk_exe.cpp my_dll.h NAME sdk_exe FOLDER dll LIBRARIES my_dll)
|
||||
wx_add_sample(dll sdk_exe.cpp my_dll.h NAME sdk_exe FOLDER dll)
|
||||
wx_link_sample_libraries(sdk_exe my_dll)
|
||||
endif()
|
||||
|
||||
wx_add_sample(regtest RES regtest.rc DEPENDS wxUSE_REGKEY)
|
||||
@@ -277,8 +280,5 @@ if(WIN32)
|
||||
#TODO: reenable when sample is fixed
|
||||
#wx_add_sample(mfc mfctest.cpp mfctest.h resource.h stdafx.h RES mfctest.rc)
|
||||
wx_add_sample(taskbarbutton DEPENDS wxUSE_TASKBARBUTTON)
|
||||
if(MSVC)
|
||||
wx_add_sample(flash DEPENDS wxUSE_ACTIVEX)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -10,7 +10,7 @@
|
||||
set(wxSAMPLE_FOLDER 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/
|
||||
Index.hhk
|
||||
another.hhc
|
||||
@@ -23,21 +23,21 @@ wx_list_add_prefix(HELP_DATA_FILES helpfiles/
|
||||
page2-b.htm
|
||||
testing.hhp
|
||||
)
|
||||
wx_add_sample(help DATA ${HELP_DATA_FILES} LIBRARIES html NAME htmlhelp DEPENDS wxUSE_HELP)
|
||||
wx_add_sample(helpview DATA test.zip LIBRARIES html 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 wxhtml DEPENDS wxUSE_HELP)
|
||||
#TODO: htmlctrl sample uses outdated definitions
|
||||
#wx_add_sample(htmlctrl LIBRARIES html)
|
||||
wx_add_sample(printing DATA logo6.gif test.htm LIBRARIES html NAME htmlprinting
|
||||
#wx_add_sample(htmlctrl LIBRARIES wxhtml)
|
||||
wx_add_sample(printing DATA logo6.gif test.htm LIBRARIES wxhtml NAME htmlprinting
|
||||
DEPENDS wxUSE_PRINTING_ARCHITECTURE)
|
||||
wx_add_sample(test
|
||||
DATA
|
||||
imagemap.png pic.png pic2.bmp i18n.gif
|
||||
imagemap.htm tables.htm test.htm listtest.htm 8859_2.htm cp1250.htm
|
||||
regres.htm foo.png subsup.html
|
||||
LIBRARIES net html NAME htmltest)
|
||||
wx_add_sample(virtual DATA start.htm LIBRARIES html)
|
||||
wx_add_sample(widget DATA start.htm LIBRARIES html)
|
||||
wx_add_sample(zip DATA pages.zip start.htm LIBRARIES html DEPENDS wxUSE_FSZIP)
|
||||
LIBRARIES wxnet wxhtml NAME htmltest)
|
||||
wx_add_sample(virtual DATA start.htm LIBRARIES wxhtml)
|
||||
wx_add_sample(widget DATA start.htm LIBRARIES wxhtml)
|
||||
wx_add_sample(zip DATA pages.zip start.htm LIBRARIES wxhtml DEPENDS wxUSE_FS_ZIP)
|
||||
|
||||
set(wxSAMPLE_SUBDIR)
|
||||
set(wxSAMPLE_FOLDER)
|
||||
|
@@ -23,14 +23,6 @@ include(CheckTypeSize)
|
||||
include(CMakePushCheckState)
|
||||
include(TestBigEndian)
|
||||
|
||||
if(
|
||||
APPLE AND
|
||||
CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9 AND
|
||||
(CMAKE_CXX_STANDARD EQUAL 11 OR CMAKE_CXX_STANDARD EQUAL 14)
|
||||
)
|
||||
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-stdlib=libc++")
|
||||
endif()
|
||||
|
||||
# Add a definition to setup.h and append it to a list of defines for
|
||||
# for compile checks
|
||||
macro(wx_setup_definition def)
|
||||
@@ -65,10 +57,16 @@ endif()
|
||||
|
||||
if(WXGTK)
|
||||
# Add GTK version definitions
|
||||
foreach(gtk_version 1.2.7 2.0 2.10 2.18 2.20 3.0)
|
||||
foreach(gtk_version 1.2.7 2.0 2.10 2.18 2.20 3.0 3.90.0)
|
||||
if(wxTOOLKIT_VERSION VERSION_GREATER gtk_version)
|
||||
string(REPLACE . "" gtk_version_dotless ${gtk_version})
|
||||
set(__WXGTK${gtk_version_dotless}__ ON)
|
||||
if(gtk_version EQUAL 3.90.0)
|
||||
set(__WXGTK4__ ON)
|
||||
elseif(gtk_version EQUAL 3.0)
|
||||
set(__WXGTK3__ ON)
|
||||
else()
|
||||
string(REPLACE . "" gtk_version_dotless ${gtk_version})
|
||||
set(__WXGTK${gtk_version_dotless}__ ON)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
@@ -134,14 +132,7 @@ if(NOT MSVC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
wx_check_c_source_compiles(
|
||||
"#define test(fmt, ...) printf(fmt, __VA_ARGS__)
|
||||
test(\"%s %d %p\", \"test\", 1, 0);"
|
||||
HAVE_VARIADIC_MACROS
|
||||
stdio.h
|
||||
)
|
||||
#TODO: wxNO_VARIADIC_MACROS
|
||||
if(wxUSE_STL)
|
||||
if(wxUSE_STL AND CMAKE_CXX_STANDARD EQUAL 98)
|
||||
wx_check_cxx_source_compiles("
|
||||
std::vector<int> moo;
|
||||
std::list<int> foo;
|
||||
@@ -154,20 +145,58 @@ if(wxUSE_STL)
|
||||
if(NOT wxTEST_STL)
|
||||
message(FATAL_ERROR "Can't use wxUSE_STL as basic STL functionality is missing")
|
||||
endif()
|
||||
|
||||
wx_check_cxx_source_compiles("
|
||||
std::string foo, bar;
|
||||
foo.compare(bar);
|
||||
foo.compare(1, 1, bar);
|
||||
foo.compare(1, 1, bar, 1, 1);
|
||||
foo.compare(\"\");
|
||||
foo.compare(1, 1, \"\");
|
||||
foo.compare(1, 1, \"\", 2);"
|
||||
HAVE_STD_STRING_COMPARE
|
||||
string
|
||||
)
|
||||
endif()
|
||||
|
||||
wx_check_cxx_source_compiles("
|
||||
std::string foo, bar;
|
||||
foo.compare(bar);
|
||||
foo.compare(1, 1, bar);
|
||||
foo.compare(1, 1, bar, 1, 1);
|
||||
foo.compare(\"\");
|
||||
foo.compare(1, 1, \"\");
|
||||
foo.compare(1, 1, \"\", 2);"
|
||||
HAVE_STD_STRING_COMPARE
|
||||
string
|
||||
)
|
||||
|
||||
wx_check_cxx_source_compiles(
|
||||
"std::wstring s;"
|
||||
HAVE_STD_WSTRING
|
||||
string
|
||||
)
|
||||
|
||||
wx_check_cxx_source_compiles("
|
||||
std::hash_map<double*, char*, std::hash<double*>, std::equal_to<double*> > test1;
|
||||
std::hash_set<char*, std::hash<char*>, std::equal_to<char*> > test2;"
|
||||
HAVE_HASH_MAP
|
||||
hash_map hash_set
|
||||
)
|
||||
set(HAVE_STD_HASH_MAP ${HAVE_HASH_MAP})
|
||||
|
||||
wx_check_cxx_source_compiles("
|
||||
__gnu_cxx::hash_map<double*, char*, __gnu_cxx::hash<double*>, std::equal_to<double*> > test1;
|
||||
__gnu_cxx::hash_set<char*, __gnu_cxx::hash<char*>, std::equal_to<char*> > test2;"
|
||||
HAVE_EXT_HASH_MAP
|
||||
ext/hash_map ext/hash_set
|
||||
)
|
||||
set(HAVE_GNU_CXX_HASH_MAP ${HAVE_EXT_HASH_MAP})
|
||||
|
||||
wx_check_cxx_source_compiles("
|
||||
std::unordered_map<double*, char*> test1;
|
||||
std::unordered_set<char*> test2;"
|
||||
HAVE_STD_UNORDERED_MAP
|
||||
unordered_map unordered_set
|
||||
)
|
||||
set(HAVE_STD_UNORDERED_SET ${HAVE_STD_UNORDERED_MAP})
|
||||
|
||||
wx_check_cxx_source_compiles("
|
||||
std::tr1::unordered_map<double*, char*> test1;
|
||||
std::tr1::unordered_set<char*> test2;"
|
||||
HAVE_TR1_UNORDERED_MAP
|
||||
tr1/unordered_map tr1/unordered_set
|
||||
)
|
||||
set(HAVE_TR1_UNORDERED_SET ${HAVE_TR1_UNORDERED_MAP})
|
||||
|
||||
# Check for availability of GCC's atomic operations builtins.
|
||||
wx_check_c_source_compiles("
|
||||
unsigned int value=0;
|
||||
@@ -217,9 +246,8 @@ macro(wx_get_socket_param_type name code)
|
||||
endmacro()
|
||||
|
||||
# the following tests are for Unix(like) systems only
|
||||
if(NOT WIN32)
|
||||
if(wxUSE_LIBICONV AND NOT APPLE)
|
||||
find_package(Iconv REQUIRED)
|
||||
if(UNIX)
|
||||
if(wxUSE_LIBICONV)
|
||||
set(HAVE_ICONV ON)
|
||||
set(ICONV_CONST " ")
|
||||
if(ICONV_SECOND_ARGUMENT_IS_CONST)
|
||||
@@ -419,8 +447,8 @@ if(NOT WIN32)
|
||||
check_symbol_exists(getservbyname netdb.h HAVE_GETSERVBYNAME)
|
||||
check_symbol_exists(inet_aton arpa/inet.h HAVE_INET_ATON)
|
||||
check_symbol_exists(inet_addr arpa/inet.h HAVE_INET_ADDR)
|
||||
endif() # wxUSE_SOCKETS
|
||||
endif() # NOT WIN32
|
||||
endif(wxUSE_SOCKETS)
|
||||
endif(UNIX)
|
||||
|
||||
if(CMAKE_USE_PTHREADS_INIT)
|
||||
cmake_push_check_state(RESET)
|
||||
@@ -537,8 +565,6 @@ check_struct_has_member("struct passwd" pw_gecos pwd.h HAVE_PW_GECOS)
|
||||
# Check for functions
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# TODO: wcslen
|
||||
|
||||
# Check various string symbols
|
||||
foreach(func
|
||||
ftime
|
||||
@@ -547,20 +573,18 @@ foreach(func
|
||||
wcsdup wcsnlen wcscasecmp wcsncasecmp
|
||||
wcsrctombs
|
||||
wcstoull
|
||||
wcslen
|
||||
)
|
||||
string(TOUPPER ${func} func_upper)
|
||||
check_symbol_exists(${func} wchar.h HAVE_${func_upper})
|
||||
endforeach()
|
||||
|
||||
# Check various functions
|
||||
foreach(func
|
||||
fsync
|
||||
snprintf vsnprintf strnlen strtoull
|
||||
setpriority
|
||||
)
|
||||
string(TOUPPER ${func} func_upper)
|
||||
check_function_exists(${func} HAVE_${func_upper})
|
||||
endforeach()
|
||||
wx_check_funcs(fsync
|
||||
snprintf vsnprintf strnlen strtoull
|
||||
setpriority
|
||||
gettimeofday
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
check_symbol_exists(vsscanf stdio.h HAVE_VSSCANF)
|
||||
@@ -579,17 +603,9 @@ check_include_file(fcntl.h HAVE_FCNTL_H)
|
||||
check_include_file(langinfo.h HAVE_LANGINFO_H)
|
||||
check_include_file(sched.h HAVE_SCHED_H)
|
||||
check_include_file(unistd.h HAVE_UNISTD_H)
|
||||
check_include_file(w32api.h HAVE_W32API_H)
|
||||
check_include_file(wchar.h HAVE_WCHAR_H)
|
||||
check_include_file(wcstr.h HAVE_WCSTR_H)
|
||||
|
||||
|
||||
wx_check_cxx_source_compiles(
|
||||
"std::wstring s;"
|
||||
HAVE_STD_WSTRING
|
||||
string
|
||||
)
|
||||
|
||||
if(wxUSE_DATETIME)
|
||||
# check for timezone variable
|
||||
# doesn't exist under Darwin / Mac OS X which uses tm_gmtoff instead
|
||||
@@ -614,12 +630,8 @@ set(CMAKE_REQUIRED_LIBRARIES dl)
|
||||
check_symbol_exists(dlopen dlfcn.h HAVE_DLOPEN)
|
||||
cmake_pop_check_state()
|
||||
if(HAVE_DLOPEN)
|
||||
check_symbol_exists(dlerror dlfcn.h HAVE_DLERROR)
|
||||
check_symbol_exists(dladdr dlfcn.h HAVE_DLADDR)
|
||||
else()
|
||||
check_symbol_exists(shl_load dl.h HAVE_SHL_LOAD)
|
||||
endif()
|
||||
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
|
||||
|
||||
if(APPLE)
|
||||
set(wxUSE_EPOLL_DISPATCHER OFF)
|
||||
@@ -641,7 +653,10 @@ endif()
|
||||
|
||||
if(wxUSE_XLOCALE)
|
||||
check_include_file(xlocale.h HAVE_XLOCALE_H)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES xlocale.h locale.h)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES locale.h)
|
||||
if(HAVE_XLOCALE_H)
|
||||
list(APPEND CMAKE_EXTRA_INCLUDE_FILES xlocale.h)
|
||||
endif()
|
||||
check_type_size(locale_t LOCALE_T)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES)
|
||||
endif()
|
||||
|
@@ -182,8 +182,6 @@
|
||||
#cmakedefine01 wxUSE_UNICODE
|
||||
#endif
|
||||
|
||||
#cmakedefine01 wxUSE_WCHAR_T
|
||||
|
||||
|
||||
#cmakedefine01 wxUSE_EXCEPTIONS
|
||||
|
||||
@@ -222,9 +220,6 @@
|
||||
|
||||
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
|
||||
|
||||
#cmakedefine01 wxUSE_IOSTREAMH
|
||||
|
||||
|
||||
|
||||
#cmakedefine01 wxUSE_LONGLONG
|
||||
|
||||
@@ -367,6 +362,8 @@
|
||||
#cmakedefine01 wxUSE_WEBVIEW_IE
|
||||
#endif
|
||||
|
||||
#cmakedefine01 wxUSE_WEBVIEW_EDGE
|
||||
|
||||
#if (defined(__WXGTK__) && !defined(__WXGTK3__)) || defined(__WXOSX__)
|
||||
#cmakedefine01 wxUSE_WEBVIEW_WEBKIT
|
||||
#else
|
||||
@@ -442,6 +439,8 @@
|
||||
#cmakedefine01 wxUSE_TREECTRL
|
||||
#cmakedefine01 wxUSE_TREELISTCTRL
|
||||
|
||||
#cmakedefine01 wxUSE_NATIVE_DATAVIEWCTRL
|
||||
|
||||
#cmakedefine01 wxUSE_STATUSBAR
|
||||
|
||||
#cmakedefine01 wxUSE_NATIVE_STATUSBAR
|
||||
@@ -496,6 +495,8 @@
|
||||
|
||||
#cmakedefine01 wxUSE_MENUS
|
||||
|
||||
#cmakedefine01 wxUSE_MENUBAR
|
||||
|
||||
#cmakedefine01 wxUSE_NOTIFICATION_MESSAGE
|
||||
|
||||
#cmakedefine01 wxUSE_PREFERENCES_EDITOR
|
||||
@@ -576,6 +577,8 @@
|
||||
|
||||
#cmakedefine01 wxUSE_GLCANVAS
|
||||
|
||||
#cmakedefine01 wxUSE_GLCANVAS_EGL
|
||||
|
||||
#cmakedefine01 wxUSE_RICHTEXT
|
||||
|
||||
|
||||
@@ -660,7 +663,6 @@
|
||||
#cmakedefine01 wxUSE_THEME_MONO
|
||||
#cmakedefine01 wxUSE_THEME_WIN32
|
||||
|
||||
|
||||
/* --- end common options --- */
|
||||
|
||||
/*
|
||||
@@ -742,6 +744,8 @@
|
||||
|
||||
#cmakedefine01 wxUSE_INICONF
|
||||
|
||||
#cmakedefine01 wxUSE_WINSOCK2
|
||||
|
||||
|
||||
#cmakedefine01 wxUSE_DATEPICKCTRL_GENERIC
|
||||
|
||||
@@ -767,11 +771,6 @@
|
||||
*/
|
||||
#cmakedefine VA_LIST_IS_ARRAY 1
|
||||
|
||||
/*
|
||||
* Define if the compiler supports variadic macros
|
||||
*/
|
||||
#cmakedefine HAVE_VARIADIC_MACROS 1
|
||||
|
||||
/*
|
||||
* Define if you don't want variadic macros to be used even if they are
|
||||
* supported by the compiler.
|
||||
@@ -1012,9 +1011,6 @@
|
||||
/* Define if you have pthread_attr_setstacksize */
|
||||
#cmakedefine HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
|
||||
|
||||
/* Define if you have shl_load() */
|
||||
#cmakedefine HAVE_SHL_LOAD 1
|
||||
|
||||
/* Define if you have snprintf() */
|
||||
#cmakedefine HAVE_SNPRINTF 1
|
||||
|
||||
@@ -1117,9 +1113,6 @@
|
||||
/* Define if wchar_t is distinct type in your compiler. */
|
||||
#cmakedefine wxWCHAR_T_IS_REAL_TYPE 1
|
||||
|
||||
/* Define if you have the dlerror function. */
|
||||
#cmakedefine HAVE_DLERROR 1
|
||||
|
||||
/* Define if you have the dladdr function. */
|
||||
#cmakedefine HAVE_DLADDR 1
|
||||
|
||||
@@ -1231,9 +1224,6 @@
|
||||
/* Define if you have the <langinfo.h> header file. */
|
||||
#cmakedefine HAVE_LANGINFO_H 1
|
||||
|
||||
/* Define if you have the <w32api.h> header file (mingw,cygwin). */
|
||||
#cmakedefine HAVE_W32API_H 1
|
||||
|
||||
/* Define if you have the <sys/soundcard.h> header file. */
|
||||
#cmakedefine HAVE_SYS_SOUNDCARD_H 1
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#############################################################################
|
||||
# Name: build/cmake/main.cmake
|
||||
# Name: build/cmake/source_groups.cmake
|
||||
# Purpose: CMake source groups file
|
||||
# Author: Tobias Taschner
|
||||
# Created: 2016-10-14
|
||||
|
@@ -14,5 +14,6 @@ if(wxUSE_GUI AND wxBUILD_TESTS STREQUAL "ALL")
|
||||
|
||||
add_subdirectory(drawing)
|
||||
add_subdirectory(gui)
|
||||
add_subdirectory(headers)
|
||||
|
||||
endif()
|
||||
|
@@ -122,9 +122,9 @@ wx_add_test(test_base ${TEST_SRC}
|
||||
)
|
||||
target_compile_definitions(test_base PRIVATE wxUSE_GUI=0 wxUSE_BASE=1)
|
||||
if(wxUSE_SOCKETS)
|
||||
wx_exe_link_libraries(test_base net)
|
||||
wx_exe_link_libraries(test_base wxnet)
|
||||
endif()
|
||||
if(wxUSE_XML)
|
||||
wx_exe_link_libraries(test_base xml)
|
||||
wx_exe_link_libraries(test_base wxxml)
|
||||
endif()
|
||||
wx_test_enable_precomp(test_base)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#############################################################################
|
||||
# Name: build/cmake/tests/base/CMakeLists.txt
|
||||
# Name: build/cmake/tests/drawing/CMakeLists.txt
|
||||
# Purpose: CMake file for drawing test
|
||||
# Author: Tobias Taschner
|
||||
# Created: 2016-10-31
|
||||
@@ -41,9 +41,9 @@ wx_add_test(test_drawing ${TEST_DRAWING_SRC}
|
||||
DATA ${TEST_DRAWING_DATA}
|
||||
)
|
||||
if(wxUSE_SOCKETS)
|
||||
wx_exe_link_libraries(test_drawing net)
|
||||
wx_exe_link_libraries(test_drawing wxnet)
|
||||
endif()
|
||||
wx_exe_link_libraries(test_drawing core)
|
||||
wx_exe_link_libraries(test_drawing wxcore)
|
||||
wx_test_enable_precomp(test_drawing)
|
||||
|
||||
# This is a sample plugin, it simply uses a wxImage based
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#############################################################################
|
||||
# Name: build/cmake/tests/base/CMakeLists.txt
|
||||
# Name: build/cmake/tests/gui/CMakeLists.txt
|
||||
# Purpose: CMake file for gui test
|
||||
# Author: Tobias Taschner
|
||||
# Created: 2016-10-31
|
||||
@@ -22,9 +22,11 @@ set(TEST_GUI_SRC
|
||||
graphics/affinematrix.cpp
|
||||
graphics/boundingbox.cpp
|
||||
graphics/clippingbox.cpp
|
||||
graphics/coords.cpp
|
||||
graphics/graphmatrix.cpp
|
||||
graphics/graphpath.cpp
|
||||
config/config.cpp
|
||||
controls/auitest.cpp
|
||||
controls/bitmapcomboboxtest.cpp
|
||||
controls/bitmaptogglebuttontest.cpp
|
||||
controls/bookctrlbasetest.cpp
|
||||
@@ -63,6 +65,7 @@ set(TEST_GUI_SRC
|
||||
controls/slidertest.cpp
|
||||
controls/spinctrldbltest.cpp
|
||||
controls/spinctrltest.cpp
|
||||
controls/styledtextctrltest.cpp
|
||||
controls/textctrltest.cpp
|
||||
controls/textentrytest.cpp
|
||||
controls/togglebuttontest.cpp
|
||||
@@ -101,11 +104,13 @@ set(TEST_GUI_SRC
|
||||
net/socket.cpp
|
||||
persistence/tlw.cpp
|
||||
persistence/dataview.cpp
|
||||
rowheightcache/rowheightcachetest.cpp
|
||||
sizers/boxsizer.cpp
|
||||
sizers/gridsizer.cpp
|
||||
sizers/wrapsizer.cpp
|
||||
toplevel/toplevel.cpp
|
||||
validators/valnum.cpp
|
||||
validators/valtext.cpp
|
||||
window/clientsize.cpp
|
||||
window/setsize.cpp
|
||||
xml/xrctest.cpp
|
||||
@@ -159,6 +164,15 @@ set(TEST_GUI_DATA
|
||||
image/horse_box_average_100x100.png
|
||||
image/horse_box_average_150x150.png
|
||||
image/horse_box_average_300x300.png
|
||||
image/paste_input_background.png
|
||||
image/paste_input_black.png
|
||||
image/paste_input_overlay_transparent_border_opaque_square.png
|
||||
image/paste_input_overlay_transparent_border_semitransparent_circle.png
|
||||
image/paste_input_overlay_transparent_border_semitransparent_square.png
|
||||
image/paste_result_background_plus_circle_plus_square.png
|
||||
image/paste_result_background_plus_overlay_transparent_border_opaque_square.png
|
||||
image/paste_result_background_plus_overlay_transparent_border_semitransparent_square.png
|
||||
image/paste_result_no_background_square_over_circle.png
|
||||
intl/ja/internat.mo
|
||||
intl/ja/internat.po
|
||||
)
|
||||
@@ -167,26 +181,32 @@ wx_add_test(test_gui ${TEST_GUI_SRC}
|
||||
DATA ${TEST_GUI_DATA}
|
||||
RES ../samples/sample.rc
|
||||
)
|
||||
wx_exe_link_libraries(test_gui core)
|
||||
wx_exe_link_libraries(test_gui wxcore)
|
||||
if(wxUSE_AUI)
|
||||
wx_exe_link_libraries(test_gui wxaui)
|
||||
endif()
|
||||
if(wxUSE_RICHTEXT)
|
||||
wx_exe_link_libraries(test_gui richtext)
|
||||
wx_exe_link_libraries(test_gui wxrichtext)
|
||||
endif()
|
||||
if(wxUSE_STC)
|
||||
wx_exe_link_libraries(test_gui wxstc)
|
||||
endif()
|
||||
if(wxUSE_MEDIACTRL)
|
||||
wx_exe_link_libraries(test_gui media)
|
||||
wx_exe_link_libraries(test_gui wxmedia)
|
||||
endif()
|
||||
if(wxUSE_XRC)
|
||||
wx_exe_link_libraries(test_gui xrc)
|
||||
wx_exe_link_libraries(test_gui wxxrc)
|
||||
endif()
|
||||
if(wxUSE_XML)
|
||||
wx_exe_link_libraries(test_gui xml)
|
||||
wx_exe_link_libraries(test_gui wxxml)
|
||||
endif()
|
||||
if(wxUSE_HTML)
|
||||
wx_exe_link_libraries(test_gui html)
|
||||
wx_exe_link_libraries(test_gui wxhtml)
|
||||
endif()
|
||||
if(wxUSE_SOCKETS)
|
||||
wx_exe_link_libraries(test_gui net)
|
||||
wx_exe_link_libraries(test_gui wxnet)
|
||||
endif()
|
||||
if(wxUSE_WEBVIEW)
|
||||
wx_exe_link_libraries(test_gui webview)
|
||||
wx_exe_link_libraries(test_gui wxwebview)
|
||||
endif()
|
||||
wx_test_enable_precomp(test_gui)
|
||||
|
25
build/cmake/tests/headers/CMakeLists.txt
Normal file
25
build/cmake/tests/headers/CMakeLists.txt
Normal file
@@ -0,0 +1,25 @@
|
||||
#############################################################################
|
||||
# Name: build/cmake/tests/headers/CMakeLists.txt
|
||||
# Purpose: CMake file for headers test
|
||||
# Author: Maarten Bent
|
||||
# Created: 2020-07-23
|
||||
# Copyright: (c) 2020 wxWidgets development team
|
||||
# Licence: wxWindows licence
|
||||
#############################################################################
|
||||
|
||||
set(TEST_SRC
|
||||
test.cpp
|
||||
testableframe.cpp
|
||||
allheaders.cpp
|
||||
|
||||
testprec.h
|
||||
testableframe.h
|
||||
allheaders.h
|
||||
)
|
||||
|
||||
wx_add_test(test_headers ${TEST_SRC})
|
||||
wx_exe_link_libraries(test_headers wxcore)
|
||||
if(wxUSE_SOCKETS)
|
||||
wx_exe_link_libraries(test_headers wxnet)
|
||||
endif()
|
||||
wx_test_enable_precomp(test_headers)
|
@@ -12,6 +12,10 @@ wx_option(wxUSE_GUI "Use GUI" ON)
|
||||
|
||||
if(CMAKE_OSX_SYSROOT MATCHES iphoneos)
|
||||
set(IPHONE ON)
|
||||
|
||||
# workaround a bug where try_compile (and functions using it,
|
||||
# like find_package, check_c_source_compiles) fails
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
@@ -24,11 +28,11 @@ elseif(APPLE AND IPHONE)
|
||||
set(wxPLATFORM OSX)
|
||||
elseif(APPLE)
|
||||
set(wxDEFAULT_TOOLKIT osx_cocoa)
|
||||
set(wxTOOLKIT_OPTIONS osx_cocoa gtk2 gtk3 qt)
|
||||
set(wxTOOLKIT_OPTIONS osx_cocoa gtk2 gtk3 gtk4 qt)
|
||||
set(wxPLATFORM OSX)
|
||||
elseif(UNIX)
|
||||
set(wxDEFAULT_TOOLKIT gtk2)
|
||||
set(wxTOOLKIT_OPTIONS gtk2 gtk3 motif qt)
|
||||
set(wxDEFAULT_TOOLKIT gtk3)
|
||||
set(wxTOOLKIT_OPTIONS gtk2 gtk3 gtk4 motif qt)
|
||||
set(wxPLATFORM UNIX)
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported platform")
|
||||
@@ -72,7 +76,9 @@ if(UNIX AND NOT APPLE AND NOT WIN32)
|
||||
endif()
|
||||
|
||||
if(WXGTK)
|
||||
if(WXGTK3)
|
||||
if(WXGTK4)
|
||||
set(gtk_lib GTK4)
|
||||
elseif(WXGTK3)
|
||||
set(gtk_lib GTK3)
|
||||
elseif(WXGTK2)
|
||||
set(gtk_lib GTK2)
|
||||
|
@@ -14,24 +14,34 @@ if(wxUSE_XRC)
|
||||
target_compile_definitions(wxrc PRIVATE WXUSINGDLL)
|
||||
endif()
|
||||
if(wxUSE_XML)
|
||||
wx_exe_link_libraries(wxrc xml)
|
||||
wx_exe_link_libraries(wxrc wxxml)
|
||||
endif()
|
||||
wx_exe_link_libraries(wxrc base)
|
||||
wx_exe_link_libraries(wxrc wxbase)
|
||||
|
||||
set_target_properties(wxrc PROPERTIES FOLDER "Utilities")
|
||||
|
||||
if(UNIX)
|
||||
wx_install(TARGETS wxrc RUNTIME DESTINATION "bin")
|
||||
wx_install(TARGETS wxrc
|
||||
RUNTIME DESTINATION "bin"
|
||||
BUNDLE DESTINATION "bin"
|
||||
)
|
||||
|
||||
if(IPHONE)
|
||||
set(EXE_SUFFIX ".app")
|
||||
else()
|
||||
set(EXE_SUFFIX ${CMAKE_EXECUTABLE_SUFFIX})
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
install(CODE "execute_process( \
|
||||
COMMAND ${CMAKE_COMMAND} -E rename \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION} \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc${EXE_SUFFIX} \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION}${EXE_SUFFIX} \
|
||||
)"
|
||||
)
|
||||
install(CODE "execute_process( \
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION} \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION}${EXE_SUFFIX} \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc${EXE_SUFFIX} \
|
||||
)"
|
||||
)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user