From 0de05554e5c163d2238e37b5034ab008bd8c3b5a Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sun, 3 Dec 2017 20:27:08 +1030 Subject: [PATCH 02/13] Enable all libraries on windows --- cmake/modules/FindCairo.cmake | 25 ++++++++++--------------- cmake/modules/FindFontconfig.cmake | 14 ++++++-------- cmake/modules/FindGTK.cmake | 9 +++------ cmake/modules/FindLCMS2.cmake | 8 +++----- cmake/modules/FindNSS3.cmake | 9 +++------ 5 files changed, 25 insertions(+), 40 deletions(-) diff --git a/cmake/modules/FindCairo.cmake b/cmake/modules/FindCairo.cmake index d536c051..b75e6d25 100644 --- a/cmake/modules/FindCairo.cmake +++ b/cmake/modules/FindCairo.cmake @@ -18,21 +18,16 @@ if(CAIRO_INCLUDE_DIRS AND CAIRO_LIBRARIES) else(CAIRO_INCLUDE_DIRS AND CAIRO_LIBRARIES) -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 REQUIRED) - if(Cairo_FIND_VERSION_COUNT GREATER 0) - set(_cairo_version_cmp ">=${Cairo_FIND_VERSION}") - endif(Cairo_FIND_VERSION_COUNT GREATER 0) - pkg_check_modules(_pc_cairo cairo${_cairo_version_cmp}) - if(_pc_cairo_FOUND) - set(CAIRO_FOUND TRUE) - endif(_pc_cairo_FOUND) -else(NOT WIN32) - # assume so, for now - set(CAIRO_FOUND TRUE) -endif(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 REQUIRED) +if(Cairo_FIND_VERSION_COUNT GREATER 0) +set(_cairo_version_cmp ">=${Cairo_FIND_VERSION}") +endif(Cairo_FIND_VERSION_COUNT GREATER 0) +pkg_check_modules(_pc_cairo cairo${_cairo_version_cmp}) +if(_pc_cairo_FOUND) +set(CAIRO_FOUND TRUE) +endif(_pc_cairo_FOUND) if(CAIRO_FOUND) # set it back as false diff --git a/cmake/modules/FindFontconfig.cmake b/cmake/modules/FindFontconfig.cmake index 268a61ae..c26d80db 100644 --- a/cmake/modules/FindFontconfig.cmake +++ b/cmake/modules/FindFontconfig.cmake @@ -19,14 +19,12 @@ if (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) 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 fontconfig) - - set(FONTCONFIG_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER}) - endif (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 fontconfig) + + set(FONTCONFIG_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER}) find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h PATHS diff --git a/cmake/modules/FindGTK.cmake b/cmake/modules/FindGTK.cmake index 10e22924..f417d306 100644 --- a/cmake/modules/FindGTK.cmake +++ b/cmake/modules/FindGTK.cmake @@ -12,11 +12,8 @@ include(FindPackageHandleStandardArgs) -if (NOT WIN32) - find_package(PkgConfig REQUIRED) +find_package(PkgConfig REQUIRED) - pkg_check_modules(GTK3 "gtk+-3.0>=3.8" "gdk-pixbuf-2.0") +pkg_check_modules(GTK3 "gtk+-3.0>=3.8" "gdk-pixbuf-2.0") - find_package_handle_standard_args(GTK DEFAULT_MSG GTK3_LIBRARIES GTK3_CFLAGS) - -endif(NOT WIN32) +find_package_handle_standard_args(GTK DEFAULT_MSG GTK3_LIBRARIES GTK3_CFLAGS) diff --git a/cmake/modules/FindLCMS2.cmake b/cmake/modules/FindLCMS2.cmake index 2ec91d04..049042c5 100644 --- a/cmake/modules/FindLCMS2.cmake +++ b/cmake/modules/FindLCMS2.cmake @@ -16,11 +16,9 @@ # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls -if(NOT WIN32) - find_package(PkgConfig) - pkg_check_modules(PC_LCMS2 lcms2) - set(LCMS2_DEFINITIONS ${PC_LCMS2_CFLAGS_OTHER}) -endif(NOT WIN32) +find_package(PkgConfig) +pkg_check_modules(PC_LCMS2 lcms2) +set(LCMS2_DEFINITIONS ${PC_LCMS2_CFLAGS_OTHER}) find_path(LCMS2_INCLUDE_DIR lcms2.h PATHS diff --git a/cmake/modules/FindNSS3.cmake b/cmake/modules/FindNSS3.cmake index 657cad88..e224e71d 100644 --- a/cmake/modules/FindNSS3.cmake +++ b/cmake/modules/FindNSS3.cmake @@ -12,11 +12,8 @@ include(FindPackageHandleStandardArgs) -if (NOT WIN32) - find_package(PkgConfig REQUIRED) +find_package(PkgConfig REQUIRED) - pkg_check_modules(NSS3 "nss>=3.19") +pkg_check_modules(NSS3 "nss>=3.19") - find_package_handle_standard_args(NSS3 DEFAULT_MSG NSS3_LIBRARIES NSS3_CFLAGS) - -endif(NOT WIN32) +find_package_handle_standard_args(NSS3 DEFAULT_MSG NSS3_LIBRARIES NSS3_CFLAGS) -- 2.11.0