Merge branch 'cmake-install' of https://github.com/MaartenBent/wxWidgets
Install wxrc on all platforms and other fixes, including better support for external libraries. See https://github.com/wxWidgets/wxWidgets/pull/1072
This commit is contained in:
@@ -105,9 +105,13 @@ function(wx_set_common_target_properties target_name)
|
||||
endif()
|
||||
# TODO: add warning flags for other compilers
|
||||
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()
|
||||
|
||||
@@ -520,16 +524,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()
|
||||
|
@@ -134,9 +134,6 @@ 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)
|
||||
@@ -146,24 +143,92 @@ 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_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
|
||||
@@ -283,9 +348,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 UNIX AND wxUSE_LIBSDL)
|
||||
find_package(SDL2)
|
||||
if(NOT SDL2_FOUND)
|
||||
find_package(SDL)
|
||||
@@ -294,5 +362,66 @@ 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()
|
||||
|
@@ -48,8 +48,8 @@ if(UNIX AND wxUSE_SECRETSTORE)
|
||||
wx_lib_include_directories(base PRIVATE ${LIBSECRET_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(base PRIVATE ${LIBSECRET_LIBRARIES})
|
||||
endif()
|
||||
if(wxUSE_LIBICONV AND ICONV_FOUND)
|
||||
wx_lib_include_directories(base PRIVATE ${ICONV_INCLUDE_DIRS})
|
||||
if(wxUSE_LIBICONV)
|
||||
wx_lib_include_directories(base PRIVATE ${ICONV_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(base PRIVATE ${ICONV_LIBRARIES})
|
||||
endif()
|
||||
if(wxUSE_THREADS AND CMAKE_THREAD_LIBS_INIT)
|
||||
|
@@ -77,7 +77,7 @@ if(WXGTK AND wxUSE_PRIVATE_FONTS)
|
||||
wx_lib_include_directories(core PUBLIC ${FONTCONFIG_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(core PUBLIC ${FONTCONFIG_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})
|
||||
@@ -86,5 +86,9 @@ if(UNIX AND wxUSE_LIBSDL)
|
||||
wx_lib_link_libraries(core PUBLIC ${SDL_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
if(wxUSE_LIBNOTIFY)
|
||||
wx_lib_include_directories(core PUBLIC ${LIBNOTIFY_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(core PUBLIC ${LIBNOTIFY_LIBRARIES})
|
||||
endif()
|
||||
|
||||
wx_finalize_lib(core)
|
||||
|
@@ -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})
|
||||
|
||||
if(wxUSE_LIBMSPACK)
|
||||
wx_lib_include_directories(html PRIVATE ${MSPACK_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(html PRIVATE ${MSPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
wx_finalize_lib(html)
|
||||
|
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)
|
||||
|
@@ -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,6 +42,7 @@ 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)
|
||||
|
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
|
||||
)
|
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)
|
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)
|
||||
|
@@ -46,6 +46,7 @@ endif()
|
||||
|
||||
# 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)")
|
||||
@@ -74,10 +75,17 @@ 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")
|
||||
|
||||
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()
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@@ -37,7 +37,7 @@ wx_add_sample(test
|
||||
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)
|
||||
wx_add_sample(zip DATA pages.zip start.htm LIBRARIES html DEPENDS wxUSE_FS_ZIP)
|
||||
|
||||
set(wxSAMPLE_SUBDIR)
|
||||
set(wxSAMPLE_FOLDER)
|
||||
|
@@ -217,9 +217,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 +418,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)
|
||||
@@ -641,7 +640,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()
|
||||
|
@@ -20,8 +20,8 @@ if(wxUSE_XRC)
|
||||
|
||||
set_target_properties(wxrc PROPERTIES FOLDER "Utilities")
|
||||
|
||||
wx_install(TARGETS wxrc RUNTIME DESTINATION "bin")
|
||||
if(UNIX)
|
||||
wx_install(TARGETS wxrc RUNTIME DESTINATION "bin")
|
||||
install(CODE "execute_process( \
|
||||
COMMAND ${CMAKE_COMMAND} -E rename \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc \
|
||||
|
Reference in New Issue
Block a user