mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Convert Gtk3 and Webkit to imported targets.
This causes CMake to include their headers with -isystem instead of -I, so the compiler doesn't generate warnings on them. ArchLinux was failing to build because of such warnings. Includes a function from cmake 3.6 to allow this to work on systems like Ubuntu 14.04 that still provide only cmake 3.5.
This commit is contained in:
@@ -196,7 +196,11 @@ find_package(PkgConfig REQUIRED)
|
||||
|
||||
if (NOT PKG_CONFIG_FOUND)
|
||||
message (SEND_ERROR "pkg-config not found, but is required")
|
||||
endif (NOT PKG_CONFIG_FOUND)
|
||||
endif (NOT PKG_CONFIG_FOUND)
|
||||
|
||||
if (CMAKE_VERSION VERSION_LESS 3.6)
|
||||
include(GncPkgConfig)
|
||||
endif()
|
||||
|
||||
# glib et al.
|
||||
pkg_check_modules (GLIB2 REQUIRED glib-2.0>=2.40)
|
||||
@@ -209,31 +213,42 @@ pkg_check_modules (LIBXML2 REQUIRED libxml-2.0>=2.7.0)
|
||||
pkg_check_modules (LIBXSLT REQUIRED libxslt)
|
||||
if (WITH_GNUCASH)
|
||||
if (WIN32 OR APPLE)
|
||||
pkg_check_modules (WEBKIT1 REQUIRED webkitgtk-3.0)
|
||||
set(WEBKIT1 1)
|
||||
set(WEBKIT_CFLAGS ${WEBKIT2_CFLAGS})
|
||||
set(WEBKIT_INCLUDE_DIRS ${WEBKIT1_INCLUDE_DIRS})
|
||||
set(WEBKIT_LDFLAGS ${WEBKIT1_LDFLAGS})
|
||||
set(WEBKIT_LIBRARIES ${WEBKIT1_LIBRARIES})
|
||||
if (NOT CMAKE_VERSION VERSION_LESS 3.6)
|
||||
pkg_check_modules (WEBKIT REQUIRED IMPORTED_TARGET webkitgtk-3.0)
|
||||
else()
|
||||
pkg_check_modules (WEBKIT REQUIRED webkitgtk-3.0)
|
||||
endif()
|
||||
set(WEBKIT1 1 CACHE INTERNAL "WebKitGtk")
|
||||
_pkg_create_imp_target(WEBKIT)
|
||||
else (WIN32 OR APPLE)
|
||||
pkg_check_modules (WEBKIT2_4 webkit2gtk-4.0)
|
||||
if (NOT WEBKIT2_4_FOUND)
|
||||
pkg_check_modules (WEBKIT2_3 REQUIRED webkit2gtk-3.0)
|
||||
set(WEBKIT2_3 1)
|
||||
set(WEBKIT_CFLAGS ${WEBKIT2_3_CFLAGS})
|
||||
set(WEBKIT_INCLUDE_DIRS ${WEBKIT2_3_INCLUDE_DIRS})
|
||||
set(WEBKIT_LDFLAGS ${WEBKIT2_3_LDFLAGS})
|
||||
set(WEBKIT_LIBRARIES ${WEBKIT2_3_LIBRARIES})
|
||||
else (NOT WEBKIT2_4_FOUND)
|
||||
set(WEBKIT2_4 1)
|
||||
set(WEBKIT_CFLAGS ${WEBKIT2_4_CFLAGS})
|
||||
set(WEBKIT_INCLUDE_DIRS ${WEBKIT2_4_INCLUDE_DIRS})
|
||||
set(WEBKIT_LDFLAGS ${WEBKIT2_4_LDFLAGS})
|
||||
set(WEBKIT_LIBRARIES ${WEBKIT2_4_LIBRARIES})
|
||||
endif (NOT WEBKIT2_4_FOUND)
|
||||
If (NOT CMAKE_VERSION VERSION_LESS 3.6)
|
||||
pkg_check_modules (WEBKIT IMPORTED_TARGET webkit2gtk-4.0)
|
||||
else()
|
||||
pkg_check_modules (WEBKIT webkit2gtk-4.0)
|
||||
endif()
|
||||
if (NOT WEBKIT_FOUND)
|
||||
if (NOT CMAKE_VERSION VERSION_LESS 3.6)
|
||||
pkg_check_modules (WEBKIT REQUIRED IMPORTED_TARGET webkit2gtk-3.0)
|
||||
else()
|
||||
pkg_check_modules (WEBKIT REQUIRED webkit2gtk-3.0)
|
||||
endif()
|
||||
set(WEBKIT2_3 1 CACHE INTERNAL "WebKit2Gtk3")
|
||||
else (NOT WEBKIT_FOUND)
|
||||
if (NOT WEBKIT2_3)
|
||||
set(WEBKIT2_4 1 CACHE INTERNAL "WebKit2Gtk4")
|
||||
endif(NOT WEBKIT2_3)
|
||||
endif (NOT WEBKIT_FOUND)
|
||||
if (CMAKE_VERSION VERSION_LESS 3.6)
|
||||
_pkg_create_imp_target(WEBKIT)
|
||||
endif()
|
||||
endif (WIN32 OR APPLE)
|
||||
|
||||
pkg_check_modules (GTK3 REQUIRED gtk+-3.0>=3.10.0)
|
||||
if (NOT CMAKE_VERSION VERSION_LESS 3.6)
|
||||
pkg_check_modules (GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0>=3.10.0)
|
||||
else()
|
||||
pkg_check_modules (GTK3 REQUIRED gtk+-3.0>=3.10.0)
|
||||
_pkg_create_imp_target(GTK3)
|
||||
endif()
|
||||
endif (WITH_GNUCASH)
|
||||
|
||||
pkg_check_modules (ZLIB REQUIRED zlib)
|
||||
|
||||
Reference in New Issue
Block a user