Add CMake-based build system.

Merge the original branch without any changes except for resolving the
conflict due to moving the contents of .travis.yml to a separate file by
propagating the changes done in this file since then to the new script
and rerunning ./build/update-setup-h and ./build/cmake/update_files.py
to update the file lists changed in the meanwhile.

Closes https://github.com/wxWidgets/wxWidgets/pull/330
This commit is contained in:
Vadim Zeitlin
2017-12-09 14:38:11 +01:00
66 changed files with 13755 additions and 24 deletions

View File

@@ -0,0 +1,94 @@
#############################################################################
# Name: build/cmake/lib/CMakeLists.txt
# Purpose: Main lib CMake file
# Author: Tobias Taschner
# Created: 2016-10-14
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../source_groups.cmake)
set(wxLIB_TARGETS)
if(wxBUILD_MONOLITHIC)
# Initialize variables for monolithic build
set(wxMONO_SRC_FILES)
set(wxMONO_LIBS_PRIVATE)
set(wxMONO_LIBS_PUBLIC)
set(wxMONO_INCLUDE_DIRS_PRIVATE)
set(wxMONO_INCLUDE_DIRS_PUBLIC)
endif()
# Define third party libraries
set(LIBS_THIRDPARTY regex zlib)
if(wxUSE_GUI)
list(APPEND LIBS_THIRDPARTY jpeg png tiff)
endif()
foreach(LIB IN LISTS LIBS_THIRDPARTY)
include(${LIB}.cmake)
endforeach()
# add_opt_lib()
# Add library which may have been disabled by wxUSE_...
macro(add_opt_lib name var_name)
if(${var_name})
list(APPEND LIBS ${name})
endif()
endmacro()
# Define base libraries
set(LIBS base)
add_opt_lib(net wxUSE_SOCKETS)
add_opt_lib(xml wxUSE_XML)
# Define UI libraries
if(wxUSE_GUI)
list(APPEND LIBS core adv)
foreach(lib
aui
html
propgrid
ribbon
richtext
webview
stc
xrc
)
string(TOUPPER ${lib} _name_upper)
add_opt_lib(${lib} wxUSE_${_name_upper})
endforeach()
add_opt_lib(media wxUSE_MEDIACTRL)
add_opt_lib(gl wxUSE_OPENGL)
add_opt_lib(qa wxUSE_DEBUGREPORT)
endif() # wxUSE_GUI
# Include cmake file for every library
foreach(LIB ${LIBS})
add_subdirectory(${LIB})
endforeach()
if(wxBUILD_MONOLITHIC)
# Create monolithic library target
list(LENGTH wxMONO_SRC_FILES src_file_count)
wx_add_library(mono ${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})
endforeach()
target_link_libraries(mono ${vis} ${wxMONO_LIBS_${vis}})
endif()
if(wxMONO_INCLUDE_DIRS_${vis})
target_include_directories(mono ${vis} ${wxMONO_INCLUDE_DIRS_${vis}})
endif()
if(wxMONO_DEFINITIONS_${vis})
target_compile_definitions(mono ${vis} ${wxMONO_DEFINITIONS_${vis}})
endif()
endforeach()
endif()
# Propagate variable(s) to parent scope
set(wxLIB_TARGETS ${wxLIB_TARGETS} PARENT_SCOPE)
set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} PARENT_SCOPE)

View File

@@ -0,0 +1,41 @@
#############################################################################
# Name: build/cmake/lib/adv/CMakeLists.txt
# Purpose: CMake file for adv library
# Author: Tobias Taschner
# Created: 2016-10-03
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
wx_append_sources(ADV_FILES ADVANCED_CMN)
if(WXMSW)
wx_append_sources(ADV_FILES ADVANCED_MSW)
wx_append_sources(ADV_FILES ADVANCED_MSW_NATIVE)
wx_append_sources(ADV_FILES ADVANCED_MSW_DESKTOP)
elseif(WXOSX_COCOA)
wx_append_sources(ADV_FILES ADVANCED_OSX_COCOA)
elseif(WXGTK)
wx_append_sources(ADV_FILES ADVANCED_GTK2)
wx_append_sources(ADV_FILES ADVANCED_GTK_NATIVE)
endif()
if(UNIX AND NOT APPLE AND NOT WIN32)
wx_append_sources(ADV_FILES ADVANCED_UNIX)
endif()
wx_add_library(adv ${ADV_FILES})
if(WIN32)
wx_lib_link_libraries(adv PRIVATE
winmm
)
endif()
if(WXOSX_COCOA)
wx_lib_link_libraries(adv PUBLIC
"-framework AudioToolbox"
)
endif()
wx_finalize_lib(adv)

View File

@@ -0,0 +1,22 @@
#############################################################################
# Name: build/cmake/lib/aui/CMakeLists.txt
# Purpose: CMake file for aui library
# Author: Tobias Taschner
# Created: 2016-10-04
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
wx_append_sources(AUI_FILES AUI_CMN)
if(WXMSW)
wx_append_sources(AUI_FILES AUI_MSW)
elseif(WXGTK)
wx_append_sources(AUI_FILES AUI_GTK)
endif()
wx_add_library(aui ${AUI_FILES})
wx_finalize_lib(aui)

View File

@@ -0,0 +1,92 @@
#############################################################################
# Name: build/cmake/lib/base/CMakeLists.txt
# Purpose: CMake file for base library
# Author: Tobias Taschner
# Created: 2016-09-20
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
wx_append_sources(BASE_FILES BASE_CMN)
wx_append_sources(BASE_FILES BASE_AND_GUI_CMN)
if(WIN32)
wx_append_sources(BASE_FILES BASE_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()
wx_append_sources(BASE_FILES BASE_AND_GUI_OSX_COCOA)
endif()
elseif(UNIX)
wx_append_sources(BASE_FILES BASE_UNIX)
if(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)
endif()
endif()
endif()
wx_add_library(base IS_BASE ${BASE_FILES})
wx_lib_link_libraries(base PRIVATE
${ZLIB_LIBRARIES}
${REGEX_LIBRARIES}
)
if(NOT wxBUILD_MONOLITHIC)
wx_lib_compile_definitions(base PRIVATE wxUSE_BASE=1)
endif()
if(wxUSE_ZLIB)
wx_lib_include_directories(base PRIVATE ${ZLIB_INCLUDE_DIRS})
endif()
if(wxUSE_REGEX)
wx_lib_include_directories(base PRIVATE ${REGEX_INCLUDE_DIRS})
endif()
if(LIBSECRET_FOUND)
wx_lib_include_directories(base PRIVATE ${LIBSECRET_INCLUDE_DIRS})
endif()
if(wxUSE_LIBICONV AND ICONV_LIBRARIES)
wx_lib_link_libraries(base PRIVATE ${ICONV_LIBRARIES})
endif()
if(wxUSE_THREADS AND CMAKE_THREAD_LIBS_INIT)
wx_lib_link_libraries(base PRIVATE ${CMAKE_THREAD_LIBS_INIT})
endif()
if(WIN32)
wx_lib_link_libraries(base PUBLIC
kernel32
user32
shell32
ole32
oleaut32
uuid
rpcrt4
advapi32
Shlwapi
version
uuid
)
elseif(APPLE)
wx_lib_link_libraries(base
PRIVATE
"-framework Security"
PUBLIC
"-framework Carbon"
"-framework Cocoa"
"-framework CoreFoundation"
"-framework IOKit"
)
elseif(UNIX)
wx_lib_link_libraries(base PRIVATE
dl
${LIBSECRET_LIBRARIES}
)
endif()
wx_finalize_lib(base)

View File

@@ -0,0 +1,52 @@
#############################################################################
# Name: build/cmake/lib/core/CMakeLists.txt
# Purpose: CMake file for core library
# Author: Tobias Taschner
# Created: 2016-10-01
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
wx_option(wxUSE_IMAGE "use wxImage class" ON)
wx_append_sources(CORE_SRC GUI_CMN)
wx_append_sources(CORE_SRC BASE_AND_GUI_CMN)
if(WIN32)
wx_append_sources(CORE_SRC BASE_AND_GUI_WIN32)
elseif(UNIX)
wx_append_sources(CORE_SRC UNIX)
endif()
if(WXMSW)
wx_append_sources(CORE_SRC MSW_LOWLEVEL)
wx_append_sources(CORE_SRC MSW_DESKTOP_LOWLEVEL)
wx_append_sources(CORE_SRC MSW)
wx_append_sources(CORE_SRC MSW_DESKTOP)
elseif(WXGTK)
wx_append_sources(CORE_SRC GTK2_LOWLEVEL)
wx_append_sources(CORE_SRC GTK2)
wx_append_sources(CORE_SRC XWIN_LOWLEVEL)
elseif(WXOSX_COCOA)
wx_append_sources(CORE_SRC BASE_AND_GUI_OSX_COCOA)
wx_append_sources(CORE_SRC OSX_LOWLEVEL)
wx_append_sources(CORE_SRC OSX_SHARED)
wx_append_sources(CORE_SRC OSX_COCOA)
endif()
wx_add_library(core ${CORE_SRC})
foreach(lib JPEG PNG TIFF)
if(${lib}_LIBRARIES)
if(lib STREQUAL JPEG)
wx_lib_include_directories(core PRIVATE ${${lib}_INCLUDE_DIR})
else()
wx_lib_include_directories(core PRIVATE ${${lib}_INCLUDE_DIRS})
endif()
wx_lib_link_libraries(core PRIVATE ${${lib}_LIBRARIES})
endif()
endforeach()
wx_finalize_lib(core)

View File

@@ -0,0 +1,24 @@
#############################################################################
# Name: build/cmake/lib/gl/CMakeLists.txt
# Purpose: CMake file for gl library
# Author: Tobias Taschner
# Created: 2016-10-03
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
wx_append_sources(GL_FILES OPENGL_CMN)
if(WIN32)
wx_append_sources(GL_FILES OPENGL_MSW)
elseif(APPLE)
wx_append_sources(GL_FILES OPENGL_OSX_SHARED)
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_finalize_lib(gl)

View File

@@ -0,0 +1,20 @@
#############################################################################
# Name: build/cmake/lib/html/CMakeLists.txt
# Purpose: CMake file for html library
# Author: Tobias Taschner
# Created: 2016-10-03
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
wx_append_sources(HTML_FILES HTML_CMN)
if(WIN32)
wx_append_sources(HTML_FILES HTML_MSW)
endif()
wx_add_library(html ${HTML_FILES})
wx_finalize_lib(html)

View File

@@ -0,0 +1,69 @@
#############################################################################
# Name: build/cmake/lib/jpeg.cmake
# Purpose: Use external or internal libjpeg
# Author: Tobias Taschner
# Created: 2016-09-21
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_add_thirdparty_library(wxUSE_LIBJPEG JPEG "use libjpeg (JPEG file format)")
if(wxUSE_LIBJPEG STREQUAL "builtin")
wx_add_builtin_library(wxjpeg
src/jpeg/jaricom.c
src/jpeg/jcapimin.c
src/jpeg/jcapistd.c
src/jpeg/jcarith.c
src/jpeg/jccoefct.c
src/jpeg/jccolor.c
src/jpeg/jcdctmgr.c
src/jpeg/jchuff.c
src/jpeg/jcinit.c
src/jpeg/jcmainct.c
src/jpeg/jcmarker.c
src/jpeg/jcmaster.c
src/jpeg/jcomapi.c
src/jpeg/jcparam.c
src/jpeg/jcprepct.c
src/jpeg/jcsample.c
src/jpeg/jctrans.c
src/jpeg/jdapimin.c
src/jpeg/jdapistd.c
src/jpeg/jdarith.c
src/jpeg/jdatadst.c
src/jpeg/jdatasrc.c
src/jpeg/jdcoefct.c
src/jpeg/jdcolor.c
src/jpeg/jddctmgr.c
src/jpeg/jdhuff.c
src/jpeg/jdinput.c
src/jpeg/jdmainct.c
src/jpeg/jdmarker.c
src/jpeg/jdmaster.c
src/jpeg/jdmerge.c
src/jpeg/jdpostct.c
src/jpeg/jdsample.c
src/jpeg/jdtrans.c
src/jpeg/jerror.c
src/jpeg/jfdctflt.c
src/jpeg/jfdctfst.c
src/jpeg/jfdctint.c
src/jpeg/jidctflt.c
src/jpeg/jidctfst.c
src/jpeg/jidctint.c
src/jpeg/jmemmgr.c
src/jpeg/jmemnobs.c
src/jpeg/jquant1.c
src/jpeg/jquant2.c
src/jpeg/jutils.c
)
target_include_directories(wxjpeg
BEFORE PRIVATE
${wxSETUP_HEADER_PATH}
)
set(JPEG_LIBRARIES wxjpeg)
set(JPEG_INCLUDE_DIR ${wxSOURCE_DIR}/src/jpeg)
elseif(wxUSE_LIBJPEG)
find_package(JPEG REQUIRED)
endif()

View File

@@ -0,0 +1,36 @@
#############################################################################
# Name: build/cmake/lib/media/CMakeLists.txt
# Purpose: CMake file for media library
# Author: Tobias Taschner
# Created: 2016-10-03
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
wx_append_sources(MEDIA_FILES MEDIA_CMN)
if(WXMSW)
wx_append_sources(MEDIA_FILES MEDIA_MSW)
elseif(WXOSX_COCOA)
wx_append_sources(MEDIA_FILES MEDIA_OSX_COCOA)
elseif(UNIX)
wx_append_sources(MEDIA_FILES MEDIA_UNIX)
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
"-framework AVFoundation"
"-framework AVKit"
"-framework CoreMedia"
)
elseif(UNIX)
wx_lib_include_directories(media PUBLIC ${GSTREAMER_INCLUDE_DIRS})
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_LIBRARIES})
endif()
wx_finalize_lib(media)

View File

@@ -0,0 +1,30 @@
#############################################################################
# Name: build/cmake/lib/net/CMakeLists.txt
# Purpose: CMake file for net library
# Author: Tobias Taschner
# Created: 2016-09-21
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
wx_append_sources(NET_FILES NET_CMN)
if(WIN32)
wx_append_sources(NET_FILES NET_WIN32)
elseif(APPLE)
wx_append_sources(NET_FILES NET_OSX)
endif()
if(UNIX AND NOT WIN32)
wx_append_sources(NET_FILES NET_UNIX)
endif()
wx_add_library(net IS_BASE ${NET_FILES})
if(WIN32)
wx_lib_link_libraries(net PRIVATE Ws2_32)
endif()
wx_finalize_lib(net)

43
build/cmake/lib/png.cmake Normal file
View File

@@ -0,0 +1,43 @@
#############################################################################
# Name: build/cmake/lib/png.cmake
# Purpose: Use external or internal libpng
# Author: Tobias Taschner
# Created: 2016-09-21
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_add_thirdparty_library(wxUSE_LIBPNG PNG "use libpng (PNG image format)")
if(wxUSE_LIBPNG STREQUAL "builtin")
wx_add_builtin_library(wxpng
src/png/png.c
src/png/pngerror.c
src/png/pngget.c
src/png/pngmem.c
src/png/pngpread.c
src/png/pngread.c
src/png/pngrio.c
src/png/pngrtran.c
src/png/pngrutil.c
src/png/pngset.c
src/png/pngtrans.c
src/png/pngwio.c
src/png/pngwrite.c
src/png/pngwtran.c
src/png/pngwutil.c
)
if(WIN32)
# define this to get rid of a warning about using POSIX lfind():
# confusingly enough, we do define lfind as _lfind for MSVC but
# doing this results in a just more confusing warning, see:
# http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101278
target_compile_definitions(wxpng PRIVATE _CRT_NONSTDC_NO_WARNINGS)
endif()
target_include_directories(wxpng PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(wxpng PRIVATE ${ZLIB_LIBRARIES})
set(PNG_LIBRARIES wxpng)
set(PNG_INCLUDE_DIRS ${wxSOURCE_DIR}/src/png)
elseif(wxUSE_LIBPNG)
find_package(PNG REQUIRED)
endif()

View File

@@ -0,0 +1,17 @@
#############################################################################
# Name: build/cmake/lib/propgrid/CMakeLists.txt
# Purpose: CMake file for propgrid library
# Author: Tobias Taschner
# Created: 2016-10-04
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
wx_append_sources(PROPGRID_FILES PROPGRID)
wx_add_library(propgrid ${PROPGRID_FILES})
wx_lib_link_libraries(propgrid PRIVATE adv)
wx_finalize_lib(propgrid)

View File

@@ -0,0 +1,17 @@
#############################################################################
# Name: build/cmake/lib/qa/CMakeLists.txt
# Purpose: CMake file for qa library
# Author: Tobias Taschner
# Created: 2016-10-03
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
wx_append_sources(QA_FILES QA)
wx_add_library(qa ${QA_FILES})
wx_lib_link_libraries(qa PUBLIC xml)
wx_finalize_lib(qa)

View File

@@ -0,0 +1,26 @@
#############################################################################
# Name: build/cmake/lib/regex.cmake
# Purpose: Use external or internal regex lib
# Author: Tobias Taschner
# Created: 2016-09-25
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_add_thirdparty_library(wxUSE_REGEX REGEX "enable support for wxRegEx class" DEFAULT builtin)
if(wxUSE_REGEX)
# TODO: Forcing builtin until sys is implemented
set(wxUSE_REGEX builtin)
wx_add_builtin_library(wxregex
src/regex/regcomp.c
src/regex/regexec.c
src/regex/regerror.c
src/regex/regfree.c
)
target_include_directories(wxregex PRIVATE ${wxSETUP_HEADER_PATH} ${wxSOURCE_DIR}/include)
set(REGEX_LIBRARIES wxregex)
set(REGEX_INCLUDE_DIRS ${wxSOURCE_DIR}/src/regex)
endif()
#TODO: find external lib and include dir

View File

@@ -0,0 +1,16 @@
#############################################################################
# Name: build/cmake/lib/ribbon/CMakeLists.txt
# Purpose: CMake file for ribbon library
# Author: Tobias Taschner
# Created: 2016-10-04
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
wx_append_sources(RIBBON_FILES RIBBON)
wx_add_library(ribbon ${RIBBON_FILES})
wx_finalize_lib(ribbon)

View File

@@ -0,0 +1,17 @@
#############################################################################
# Name: build/cmake/lib/richtext/CMakeLists.txt
# Purpose: CMake file for richtext library
# Author: Tobias Taschner
# Created: 2016-10-04
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
wx_append_sources(RICHTEXT_FILES RICHTEXT)
wx_add_library(richtext ${RICHTEXT_FILES})
wx_lib_link_libraries(richtext PRIVATE adv html xml)
wx_finalize_lib(richtext)

View File

@@ -0,0 +1,180 @@
#############################################################################
# Name: build/cmake/lib/stc/CMakeLists.txt
# Purpose: CMake file for stc library
# Author: Tobias Taschner
# Created: 2016-10-04
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
wx_append_sources(STC_FILES STC)
wx_add_builtin_library(wxscintilla
src/stc/scintilla/lexers/LexA68k.cxx
src/stc/scintilla/lexers/LexAbaqus.cxx
src/stc/scintilla/lexers/LexAda.cxx
src/stc/scintilla/lexers/LexAPDL.cxx
src/stc/scintilla/lexers/LexAsm.cxx
src/stc/scintilla/lexers/LexAsn1.cxx
src/stc/scintilla/lexers/LexASY.cxx
src/stc/scintilla/lexers/LexAU3.cxx
src/stc/scintilla/lexers/LexAVE.cxx
src/stc/scintilla/lexers/LexAVS.cxx
src/stc/scintilla/lexers/LexBaan.cxx
src/stc/scintilla/lexers/LexBash.cxx
src/stc/scintilla/lexers/LexBasic.cxx
src/stc/scintilla/lexers/LexBatch.cxx
src/stc/scintilla/lexers/LexBibTeX.cxx
src/stc/scintilla/lexers/LexBullant.cxx
src/stc/scintilla/lexers/LexCaml.cxx
src/stc/scintilla/lexers/LexCLW.cxx
src/stc/scintilla/lexers/LexCmake.cxx
src/stc/scintilla/lexers/LexCOBOL.cxx
src/stc/scintilla/lexers/LexCoffeeScript.cxx
src/stc/scintilla/lexers/LexConf.cxx
src/stc/scintilla/lexers/LexCPP.cxx
src/stc/scintilla/lexers/LexCrontab.cxx
src/stc/scintilla/lexers/LexCsound.cxx
src/stc/scintilla/lexers/LexCSS.cxx
src/stc/scintilla/lexers/LexD.cxx
src/stc/scintilla/lexers/LexDiff.cxx
src/stc/scintilla/lexers/LexDMAP.cxx
src/stc/scintilla/lexers/LexDMIS.cxx
src/stc/scintilla/lexers/LexECL.cxx
src/stc/scintilla/lexers/LexEiffel.cxx
src/stc/scintilla/lexers/LexErlang.cxx
src/stc/scintilla/lexers/LexErrorList.cxx
src/stc/scintilla/lexers/LexEScript.cxx
src/stc/scintilla/lexers/LexFlagship.cxx
src/stc/scintilla/lexers/LexForth.cxx
src/stc/scintilla/lexers/LexFortran.cxx
src/stc/scintilla/lexers/LexGAP.cxx
src/stc/scintilla/lexers/LexGui4Cli.cxx
src/stc/scintilla/lexers/LexHaskell.cxx
src/stc/scintilla/lexers/LexHex.cxx
src/stc/scintilla/lexers/LexHTML.cxx
src/stc/scintilla/lexers/LexInno.cxx
src/stc/scintilla/lexers/LexJSON.cxx
src/stc/scintilla/lexers/LexKix.cxx
src/stc/scintilla/lexers/LexKVIrc.cxx
src/stc/scintilla/lexers/LexLaTeX.cxx
src/stc/scintilla/lexers/LexLisp.cxx
src/stc/scintilla/lexers/LexLout.cxx
src/stc/scintilla/lexers/LexLua.cxx
src/stc/scintilla/lexers/LexMagik.cxx
src/stc/scintilla/lexers/LexMake.cxx
src/stc/scintilla/lexers/LexMarkdown.cxx
src/stc/scintilla/lexers/LexMatlab.cxx
src/stc/scintilla/lexers/LexMetapost.cxx
src/stc/scintilla/lexers/LexMMIXAL.cxx
src/stc/scintilla/lexers/LexModula.cxx
src/stc/scintilla/lexers/LexMPT.cxx
src/stc/scintilla/lexers/LexMSSQL.cxx
src/stc/scintilla/lexers/LexMySQL.cxx
src/stc/scintilla/lexers/LexNimrod.cxx
src/stc/scintilla/lexers/LexNsis.cxx
src/stc/scintilla/lexers/LexNull.cxx
src/stc/scintilla/lexers/LexOpal.cxx
src/stc/scintilla/lexers/LexOScript.cxx
src/stc/scintilla/lexers/LexPascal.cxx
src/stc/scintilla/lexers/LexPB.cxx
src/stc/scintilla/lexers/LexPerl.cxx
src/stc/scintilla/lexers/LexPLM.cxx
src/stc/scintilla/lexers/LexPO.cxx
src/stc/scintilla/lexers/LexPOV.cxx
src/stc/scintilla/lexers/LexPowerPro.cxx
src/stc/scintilla/lexers/LexPowerShell.cxx
src/stc/scintilla/lexers/LexProgress.cxx
src/stc/scintilla/lexers/LexProps.cxx
src/stc/scintilla/lexers/LexPS.cxx
src/stc/scintilla/lexers/LexPython.cxx
src/stc/scintilla/lexers/LexR.cxx
src/stc/scintilla/lexers/LexRebol.cxx
src/stc/scintilla/lexers/LexRegistry.cxx
src/stc/scintilla/lexers/LexRuby.cxx
src/stc/scintilla/lexers/LexRust.cxx
src/stc/scintilla/lexers/LexScriptol.cxx
src/stc/scintilla/lexers/LexSmalltalk.cxx
src/stc/scintilla/lexers/LexSML.cxx
src/stc/scintilla/lexers/LexSorcus.cxx
src/stc/scintilla/lexers/LexSpecman.cxx
src/stc/scintilla/lexers/LexSpice.cxx
src/stc/scintilla/lexers/LexSQL.cxx
src/stc/scintilla/lexers/LexSTTXT.cxx
src/stc/scintilla/lexers/LexTACL.cxx
src/stc/scintilla/lexers/LexTADS3.cxx
src/stc/scintilla/lexers/LexTAL.cxx
src/stc/scintilla/lexers/LexTCL.cxx
src/stc/scintilla/lexers/LexTCMD.cxx
src/stc/scintilla/lexers/LexTeX.cxx
src/stc/scintilla/lexers/LexTxt2tags.cxx
src/stc/scintilla/lexers/LexVB.cxx
src/stc/scintilla/lexers/LexVerilog.cxx
src/stc/scintilla/lexers/LexVHDL.cxx
src/stc/scintilla/lexers/LexVisualProlog.cxx
src/stc/scintilla/lexers/LexYAML.cxx
src/stc/scintilla/lexlib/Accessor.cxx
src/stc/scintilla/lexlib/CharacterCategory.cxx
src/stc/scintilla/lexlib/CharacterSet.cxx
src/stc/scintilla/lexlib/LexerBase.cxx
src/stc/scintilla/lexlib/LexerModule.cxx
src/stc/scintilla/lexlib/LexerNoExceptions.cxx
src/stc/scintilla/lexlib/LexerSimple.cxx
src/stc/scintilla/lexlib/PropSetSimple.cxx
src/stc/scintilla/lexlib/StyleContext.cxx
src/stc/scintilla/lexlib/WordList.cxx
src/stc/scintilla/src/AutoComplete.cxx
src/stc/scintilla/src/CallTip.cxx
src/stc/scintilla/src/CaseConvert.cxx
src/stc/scintilla/src/CaseFolder.cxx
src/stc/scintilla/src/Catalogue.cxx
src/stc/scintilla/src/CellBuffer.cxx
src/stc/scintilla/src/CharClassify.cxx
src/stc/scintilla/src/ContractionState.cxx
src/stc/scintilla/src/Decoration.cxx
src/stc/scintilla/src/Document.cxx
src/stc/scintilla/src/EditModel.cxx
src/stc/scintilla/src/EditView.cxx
src/stc/scintilla/src/Editor.cxx
src/stc/scintilla/src/ExternalLexer.cxx
src/stc/scintilla/src/Indicator.cxx
src/stc/scintilla/src/KeyMap.cxx
src/stc/scintilla/src/LineMarker.cxx
src/stc/scintilla/src/MarginView.cxx
src/stc/scintilla/src/PerLine.cxx
src/stc/scintilla/src/PositionCache.cxx
src/stc/scintilla/src/RESearch.cxx
src/stc/scintilla/src/RunStyles.cxx
src/stc/scintilla/src/ScintillaBase.cxx
src/stc/scintilla/src/Selection.cxx
src/stc/scintilla/src/Style.cxx
src/stc/scintilla/src/UniConversion.cxx
src/stc/scintilla/src/ViewStyle.cxx
src/stc/scintilla/src/XPM.cxx
)
target_include_directories(wxscintilla PRIVATE
${wxSOURCE_DIR}/src/stc/scintilla/include
${wxSOURCE_DIR}/src/stc/scintilla/lexlib
${wxSOURCE_DIR}/src/stc/scintilla/src
)
target_compile_definitions(wxscintilla PUBLIC
NO_CXX11_REGEX
__WX__
)
wx_target_enable_precomp(wxscintilla)
wx_add_library(stc ${STC_FILES})
wx_lib_include_directories(stc 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
SCI_LEXER
LINK_LEXERS
)
wx_lib_link_libraries(stc PRIVATE wxscintilla)
wx_finalize_lib(stc)

View File

@@ -0,0 +1,84 @@
#############################################################################
# Name: build/cmake/lib/tiff.cmake
# Purpose: Use external or internal libtiff
# Author: Tobias Taschner
# Created: 2016-09-21
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_add_thirdparty_library(wxUSE_LIBTIFF TIFF "use libtiff (TIFF file format)")
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()
if(WIN32)
set(TIFF_PLATFORM_SRC src/tiff/libtiff/tif_win32.c)
elseif(UNIX)
set(TIFF_PLATFORM_SRC src/tiff/libtiff/tif_unix.c)
endif()
wx_add_builtin_library(wxtiff
${TIFF_PLATFORM_SRC}
src/tiff/libtiff/tif_aux.c
src/tiff/libtiff/tif_close.c
src/tiff/libtiff/tif_codec.c
src/tiff/libtiff/tif_color.c
src/tiff/libtiff/tif_compress.c
src/tiff/libtiff/tif_dir.c
src/tiff/libtiff/tif_dirinfo.c
src/tiff/libtiff/tif_dirread.c
src/tiff/libtiff/tif_dirwrite.c
src/tiff/libtiff/tif_dumpmode.c
src/tiff/libtiff/tif_error.c
src/tiff/libtiff/tif_extension.c
src/tiff/libtiff/tif_fax3.c
src/tiff/libtiff/tif_fax3sm.c
src/tiff/libtiff/tif_flush.c
src/tiff/libtiff/tif_getimage.c
src/tiff/libtiff/tif_jbig.c
src/tiff/libtiff/tif_jpeg.c
src/tiff/libtiff/tif_jpeg_12.c
src/tiff/libtiff/tif_luv.c
src/tiff/libtiff/tif_lzma.c
src/tiff/libtiff/tif_lzw.c
src/tiff/libtiff/tif_next.c
src/tiff/libtiff/tif_ojpeg.c
src/tiff/libtiff/tif_open.c
src/tiff/libtiff/tif_packbits.c
src/tiff/libtiff/tif_pixarlog.c
src/tiff/libtiff/tif_predict.c
src/tiff/libtiff/tif_print.c
src/tiff/libtiff/tif_read.c
src/tiff/libtiff/tif_strip.c
src/tiff/libtiff/tif_swab.c
src/tiff/libtiff/tif_thunder.c
src/tiff/libtiff/tif_tile.c
src/tiff/libtiff/tif_version.c
src/tiff/libtiff/tif_warning.c
src/tiff/libtiff/tif_write.c
src/tiff/libtiff/tif_zip.c
)
if(WIN32)
# define this to get rid of a warning about using POSIX lfind():
# confusingly enough, we do define lfind as _lfind for MSVC but
# doing this results in a just more confusing warning, see:
# http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101278
target_compile_definitions(wxtiff PRIVATE _CRT_NONSTDC_NO_WARNINGS)
endif()
target_include_directories(wxtiff PRIVATE
${wxSOURCE_DIR}/src/tiff/libtiff
${ZLIB_INCLUDE_DIRS}
${JPEG_INCLUDE_DIR}
)
target_link_libraries(wxtiff PRIVATE ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES})
set(TIFF_LIBRARIES wxtiff)
set(TIFF_INCLUDE_DIRS ${wxSOURCE_DIR}/src/tiff/libtiff)
elseif(wxUSE_LIBTIFF)
find_package(TIFF REQUIRED)
endif()

View File

@@ -0,0 +1,38 @@
#############################################################################
# Name: build/cmake/lib/webview/CMakeLists.txt
# Purpose: CMake file for webview library
# Author: Tobias Taschner
# Created: 2016-10-03
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
wx_append_sources(WEBVIEW_FILES WEBVIEW_CMN)
if(WXMSW)
wx_append_sources(WEBVIEW_FILES WEBVIEW_MSW)
elseif(WXGTK)
wx_append_sources(WEBVIEW_FILES WEBVIEW_GTK)
elseif(APPLE)
wx_append_sources(WEBVIEW_FILES WEBVIEW_OSX_SHARED)
endif()
wx_add_library(webview ${WEBVIEW_FILES})
if(APPLE)
wx_lib_link_libraries(webview PUBLIC
"-framework WebKit"
)
elseif(WXGTK)
wx_lib_include_directories(webview PUBLIC
${WEBKIT_INCLUDE_DIR}
${LIBSOUP_INCLUDE_DIRS}
)
wx_lib_link_libraries(webview PUBLIC
${WEBKIT_LIBRARIES}
${LIBSOUP_LIBRARIES}
)
endif()
wx_finalize_lib(webview)

View File

@@ -0,0 +1,57 @@
#############################################################################
# Name: build/cmake/lib/xml/CMakeLists.txt
# Purpose: CMake file for xml library
# Author: Tobias Taschner
# Created: 2016-09-20
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
if(wxUSE_EXPAT STREQUAL "builtin")
ExternalProject_Add(wxexpat
DOWNLOAD_COMMAND ""
SOURCE_DIR ${wxSOURCE_DIR}/src/expat
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DBUILD_tools=OFF
-DBUILD_examples=OFF
-DBUILD_tests=OFF
-DBUILD_shared=OFF
INSTALL_COMMAND
${CMAKE_COMMAND} --build <BINARY_DIR> --config $<CONFIGURATION> --target install
COMMAND
${CMAKE_COMMAND} -E make_directory <INSTALL_DIR>/wxlib
COMMAND
${CMAKE_COMMAND} -E rename
<INSTALL_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}expat${CMAKE_STATIC_LIBRARY_SUFFIX}
<INSTALL_DIR>/wxlib/${CMAKE_STATIC_LIBRARY_PREFIX}wxexpat$<$<CONFIG:Debug>:d>${CMAKE_STATIC_LIBRARY_SUFFIX}
)
ExternalProject_Get_Property(wxexpat INSTALL_DIR)
add_library(expat STATIC IMPORTED)
set_target_properties(expat PROPERTIES
IMPORTED_LOCATION "${INSTALL_DIR}/wxlib/${CMAKE_STATIC_LIBRARY_PREFIX}wxexpat${CMAKE_STATIC_LIBRARY_SUFFIX}"
IMPORTED_LOCATION_DEBUG "${INSTALL_DIR}/wxlib/${CMAKE_STATIC_LIBRARY_PREFIX}wxexpatd${CMAKE_STATIC_LIBRARY_SUFFIX}"
FOLDER "Third Party Libraries"
)
add_dependencies(expat wxexpat)
set(EXPAT_INCLUDE_DIRS "${INSTALL_DIR}/include")
set(EXPAT_LIBRARIES expat)
if(NOT wxBUILD_SHARED)
wx_install(
FILES ${INSTALL_DIR}/wxlib/${CMAKE_STATIC_LIBRARY_PREFIX}wxexpat$<$<CONFIG:Debug>:d>${CMAKE_STATIC_LIBRARY_SUFFIX}
DESTINATION "lib${wxPLATFORM_LIB_DIR}")
endif()
elseif(wxUSE_EXPAT)
find_package(EXPAT)
endif()
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_finalize_lib(xml)

View File

@@ -0,0 +1,17 @@
#############################################################################
# Name: build/cmake/lib/xrc/CMakeLists.txt
# Purpose: CMake file for xrc library
# Author: Tobias Taschner
# Created: 2016-10-03
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
wx_append_sources(XRC_FILES XRC)
wx_add_library(xrc ${XRC_FILES})
wx_lib_link_libraries(xrc PRIVATE adv html xml)
wx_finalize_lib(xrc)

View File

@@ -0,0 +1,41 @@
#############################################################################
# Name: build/cmake/lib/zlib.cmake
# Purpose: Use external or internal zlib
# Author: Tobias Taschner
# Created: 2016-09-21
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_add_thirdparty_library(wxUSE_ZLIB ZLIB "use zlib for LZW compression"
DEFAULT_APPLE sys)
if(wxUSE_ZLIB STREQUAL "builtin")
wx_add_builtin_library(wxzlib
src/zlib/adler32.c
src/zlib/compress.c
src/zlib/crc32.c
src/zlib/deflate.c
src/zlib/gzclose.c
src/zlib/gzlib.c
src/zlib/gzread.c
src/zlib/gzwrite.c
src/zlib/infback.c
src/zlib/inffast.c
src/zlib/inflate.c
src/zlib/inftrees.c
src/zlib/trees.c
src/zlib/uncompr.c
src/zlib/zutil.c
)
if(WIN32)
# Define this to get rid of many warnings about using open(),
# read() and other POSIX functions in zlib code. This is much
# more convenient than having to modify it to avoid them.
target_compile_definitions(wxzlib PRIVATE _CRT_NONSTDC_NO_WARNINGS)
endif()
set(ZLIB_LIBRARIES wxzlib)
set(ZLIB_INCLUDE_DIRS ${wxSOURCE_DIR}/src/zlib)
elseif(wxUSE_ZLIB)
find_package(ZLIB REQUIRED)
endif()