CMake: allow to use build-in libraries on Linux

Requires updates of expat and tiff submodules.

Most libraries have their own CMakeLists, add a comment with a suggestion to
use this for implementing build-in support.
This commit is contained in:
Maarten Bent
2020-08-01 11:33:41 +02:00
parent 4cab673556
commit f25a88a13d
5 changed files with 8 additions and 10 deletions

View File

@@ -8,6 +8,8 @@
############################################################################# #############################################################################
if(wxUSE_EXPAT STREQUAL "builtin") if(wxUSE_EXPAT STREQUAL "builtin")
# TODO: implement building expat via its CMake file, using
# add_subdirectory or ExternalProject_Add
wx_add_builtin_library(wxexpat wx_add_builtin_library(wxexpat
src/expat/expat/lib/xmlparse.c src/expat/expat/lib/xmlparse.c
src/expat/expat/lib/xmlrole.c src/expat/expat/lib/xmlrole.c

View File

@@ -8,6 +8,8 @@
############################################################################# #############################################################################
if(wxUSE_LIBPNG STREQUAL "builtin") if(wxUSE_LIBPNG STREQUAL "builtin")
# TODO: implement building libpng via its CMake file, using
# add_subdirectory or ExternalProject_Add
if(NOT MSVC) if(NOT MSVC)
set(PNG_EXTRA_SOURCES set(PNG_EXTRA_SOURCES
src/png/mips/filter_msa_intrinsics.c src/png/mips/filter_msa_intrinsics.c

View File

@@ -8,7 +8,6 @@
############################################################################# #############################################################################
if(wxUSE_REGEX) if(wxUSE_REGEX)
# TODO: Forcing builtin until sys is implemented
set(wxUSE_REGEX builtin) set(wxUSE_REGEX builtin)
wx_add_builtin_library(wxregex wx_add_builtin_library(wxregex
src/regex/regcomp.c src/regex/regcomp.c
@@ -20,5 +19,3 @@ if(wxUSE_REGEX)
set(REGEX_LIBRARIES wxregex) set(REGEX_LIBRARIES wxregex)
set(REGEX_INCLUDE_DIRS ${wxSOURCE_DIR}/src/regex) set(REGEX_INCLUDE_DIRS ${wxSOURCE_DIR}/src/regex)
endif() endif()
#TODO: find external lib and include dir

View File

@@ -8,13 +8,8 @@
############################################################################# #############################################################################
if(wxUSE_LIBTIFF STREQUAL "builtin") if(wxUSE_LIBTIFF STREQUAL "builtin")
# TODO: implement building libtiff via ExternalProject_Add() # TODO: implement building libtiff via its CMake file, using
if(UNIX AND NOT APPLE) # add_subdirectory or ExternalProject_Add
message(WARNING "Builtin libtiff on unix is currently not supported")
wx_option_force_value(wxUSE_LIBTIFF OFF)
return()
endif()
if(WIN32) if(WIN32)
set(TIFF_PLATFORM_SRC src/tiff/libtiff/tif_win32.c) set(TIFF_PLATFORM_SRC src/tiff/libtiff/tif_win32.c)
elseif(UNIX) elseif(UNIX)

View File

@@ -8,6 +8,8 @@
############################################################################# #############################################################################
if(wxUSE_ZLIB STREQUAL "builtin") if(wxUSE_ZLIB STREQUAL "builtin")
# TODO: implement building zlib via its CMake file, using
# add_subdirectory or ExternalProject_Add
wx_add_builtin_library(wxzlib wx_add_builtin_library(wxzlib
src/zlib/adler32.c src/zlib/adler32.c
src/zlib/compress.c src/zlib/compress.c