CMakeLists.txt | 179 ++++++++++++++++++++++------------------------- cpp/tests/CMakeLists.txt | 2 glib/CMakeLists.txt | 2 qt4/src/CMakeLists.txt | 2 qt4/tests/CMakeLists.txt | 8 +- qt5/src/CMakeLists.txt | 2 qt5/tests/CMakeLists.txt | 8 +- test/CMakeLists.txt | 10 +- utils/CMakeLists.txt | 10 +- 9 files changed, 109 insertions(+), 114 deletions(-)
New commits: commit 5c8dfc90603111aea36add20c88abde79a351d85 Author: Albert Astals Cid <[email protected]> Date: Sun Sep 3 22:32:09 2017 +0200 Remove the old if/else cmake syntax that was weird and forced you to replicate the if clause in the else and endif diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ababd3b..f52991cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,9 +49,9 @@ option(USE_FIXEDPOINT "Use fixed point arithmetic in the Splash backend" OFF) option(USE_FLOAT "Use single precision arithmetic in the Splash backend" OFF) if(WIN32) option(ENABLE_RELOCATABLE "Do not hardcode the poppler library location (on Windows)." ON) -else(WIN32) +else() set(ENABLE_RELOCATABLE OFF) -endif(WIN32) +endif() set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)") set(SHARE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "Share directory name") @@ -79,9 +79,9 @@ endif() if(WIN32) set(_default_fontconfiguration "win32") -else(WIN32) +else() set(_default_fontconfiguration "fontconfig") -endif(WIN32) +endif() set(FONT_CONFIGURATION "${_default_fontconfiguration}" CACHE STRING "The font configuration backend (win32|fontconfig).") string(TOLOWER "${FONT_CONFIGURATION}" font_configuration) set(WITH_FONTCONFIGURATION_WIN32 OFF) @@ -90,9 +90,9 @@ if(font_configuration STREQUAL "win32") set(WITH_FONTCONFIGURATION_WIN32 ON) elseif(font_configuration STREQUAL "fontconfig") set(WITH_FONTCONFIGURATION_FONTCONFIG ON) -else(font_configuration STREQUAL "win32") +else() message(FATAL_ERROR "Invalid font configuration setting: ${FONT_CONFIGURATION}") -endif(font_configuration STREQUAL "win32") +endif() # Enable these unconditionally. set(MULTITHREADED ON) @@ -108,7 +108,7 @@ macro_bool_to_01(ENABLE_SPLASH HAVE_SPLASH) find_package(Freetype REQUIRED) if(WITH_FONTCONFIGURATION_FONTCONFIG) find_package(Fontconfig REQUIRED) -endif(WITH_FONTCONFIGURATION_FONTCONFIG) +endif() macro_optional_find_package(JPEG) macro_optional_find_package(PNG) macro_optional_find_package(TIFF) @@ -158,26 +158,26 @@ if(CAIRO_FOUND) set(POPPLER_GLIB_DISABLE_DEPRECATED "${POPPLER_GLIB_DISABLE_DEPRECATED} -DG_DISABLE_DEPRECATED") set(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES "${POPPLER_GLIB_DISABLE_SINGLE_INCLUDES} -DG_DISABLE_SINGLE_INCLUDES") macro_optional_find_package(GTK) - endif(GLIB_FOUND) -else(CAIRO_FOUND) + endif() +else() set(CAIRO_FEATURE "#undef POPPLER_HAS_CAIRO") -endif(CAIRO_FOUND) +endif() if(ENABLE_CPP) macro_optional_find_package(Iconv) set(ENABLE_CPP ${ICONV_FOUND}) set(HAVE_ICONV ${ICONV_FOUND}) -endif(ENABLE_CPP) +endif() if(ENABLE_ZLIB) find_package(ZLIB) if(ZLIB_FOUND) set(HAVE_LIBZ ${ZLIB_FOUND}) - endif(ZLIB_FOUND) + endif() set(ENABLE_ZLIB ${ZLIB_FOUND}) -endif(ENABLE_ZLIB) +endif() if(ENABLE_ZLIB_UNCOMPRESS AND NOT ENABLE_ZLIB) message("Warning: ENABLE_ZLIB_UNCOMPRESS requires ENABLE_ZLIB") set(ENABLE_ZLIB_UNCOMPRESS FALSE) -endif(ENABLE_ZLIB_UNCOMPRESS AND NOT ENABLE_ZLIB) +endif() set(USE_OPENJPEG1 FALSE) set(USE_OPENJPEG2 FALSE) set(WITH_OPENJPEG FALSE) @@ -227,7 +227,7 @@ if(ENABLE_CMS STREQUAL "auto") find_package(LCMS) set(USE_CMS ${LCMS_FOUND}) set(USE_LCMS1 ${LCMS_FOUND}) - endif(NOT LCMS2_FOUND) + endif() elseif(ENABLE_CMS STREQUAL "lcms1") find_package(LCMS) set(USE_CMS ${LCMS_FOUND}) @@ -240,23 +240,23 @@ if(ENABLE_LIBCURL) find_package(CURL) include_directories(${CURL_INCLUDE_DIR}) set(POPPLER_HAS_CURL_SUPPORT ON) -endif(ENABLE_LIBCURL) +endif() add_definitions(-DHAVE_CONFIG_H=1) if(MINGW) # Use mingw's ansi stdio extensions add_definitions(-D__USE_MINGW_ANSI_STDIO=1) -endif(MINGW) +endif() if(FONTCONFIG_FOUND) add_definitions(${FONTCONFIG_DEFINITIONS}) include_directories(${FONTCONFIG_INCLUDE_DIR}) -endif(FONTCONFIG_FOUND) +endif() if(WITH_FONTCONFIGURATION_WIN32) if(MINGW) # Set the minimum required Internet Explorer version to 5.0 add_definitions(-D_WIN32_IE=0x0500) - endif(MINGW) -endif(WITH_FONTCONFIGURATION_WIN32) + endif() +endif() include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/fofi @@ -269,39 +269,39 @@ include_directories( set(HAVE_FREETYPE_H ON) if(CMAKE_USE_PTHREADS_INIT) set(HAVE_PTHREAD ON) -endif(CMAKE_USE_PTHREADS_INIT) +endif() if(ENABLE_ZLIB) include_directories(${ZLIB_INCLUDE_DIR}) -endif(ENABLE_ZLIB) +endif() if (NSS3_FOUND) add_definitions(${NSS3_CFLAGS}) set(ENABLE_NSS3 ON) -endif(NSS3_FOUND) +endif() if(JPEG_FOUND) include_directories(${JPEG_INCLUDE_DIR}) -endif(JPEG_FOUND) +endif() if(PNG_FOUND) include_directories(${PNG_INCLUDE_DIR}) set(ENABLE_LIBPNG ON) -endif(PNG_FOUND) +endif() if(TIFF_FOUND) include_directories(${TIFF_INCLUDE_DIR}) set(ENABLE_LIBTIFF ON) -endif(TIFF_FOUND) +endif() if(LIBOPENJPEG_FOUND) include_directories(${LIBOPENJPEG_INCLUDE_DIR}) -endif(LIBOPENJPEG_FOUND) +endif() if(LIBOPENJPEG2_FOUND) include_directories(${LIBOPENJPEG2_INCLUDE_DIRS}) endif() if(LCMS_FOUND) include_directories(${LCMS_INCLUDE_DIR}) -endif(LCMS_FOUND) +endif() if(LCMS2_FOUND) include_directories(${LCMS2_INCLUDE_DIR}) -endif(LCMS2_FOUND) +endif() # Recent versions of poppler-data install a .pc file. # Use it to determine the encoding data path, if available. @@ -313,28 +313,28 @@ if(POPPLER_DATA_FOUND) OUTPUT_VARIABLE _output_var OUTPUT_STRIP_TRAILING_WHITESPACE) if(_result_var STREQUAL "0" AND NOT _output_var STREQUAL "") set(POPPLER_DATADIR "${_output_var}") - endif(_result_var STREQUAL "0" AND NOT _output_var STREQUAL "") -endif(POPPLER_DATA_FOUND) + endif() +endif() if(NOT DEFINED POPPLER_DATADIR) set(POPPLER_DATADIR "${CMAKE_INSTALL_PREFIX}/share/poppler") -endif(NOT DEFINED POPPLER_DATADIR) +endif() if(DEFINED COMPILE_WARNINGS) -else(DEFINED COMPILE_WARNINGS) +else() set(COMPILE_WARNINGS "yes") -endif(DEFINED COMPILE_WARNINGS) +endif() string(TOLOWER "${COMPILE_WARNINGS}" _comp_warnings) if(_comp_warnings STREQUAL "no") set(CMAKE_CXX_FLAGS "${DEFAULT_COMPILE_WARNINGS_NO} ${CMAKE_CXX_FLAGS}") -endif(_comp_warnings STREQUAL "no") +endif() if(_comp_warnings STREQUAL "yes") set(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "${DEFAULT_COMPILE_WARNINGS_YES} ${CMAKE_CXX_FLAGS}") -endif(_comp_warnings STREQUAL "yes") +endif() if(_comp_warnings STREQUAL "kde") set(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "${DEFAULT_COMPILE_WARNINGS_KDE} ${CMAKE_CXX_FLAGS}") -endif(_comp_warnings STREQUAL "kde") +endif() include(ConfigureChecks.cmake) @@ -454,41 +454,41 @@ if(ENABLE_SPLASH) splash/SplashXPath.cc splash/SplashXPathScanner.cc ) -endif(ENABLE_SPLASH) +endif() if(FONTCONFIG_FOUND) set(poppler_LIBS ${poppler_LIBS} ${FONTCONFIG_LIBRARIES}) -endif(FONTCONFIG_FOUND) +endif() if(JPEG_FOUND) set(poppler_SRCS ${poppler_SRCS} poppler/DCTStream.cc ) set(poppler_LIBS ${poppler_LIBS} ${JPEG_LIBRARIES}) -endif(JPEG_FOUND) +endif() if(ENABLE_ZLIB) set(poppler_SRCS ${poppler_SRCS} poppler/FlateEncoder.cc ) set(poppler_LIBS ${poppler_LIBS} ${ZLIB_LIBRARIES}) -endif(ENABLE_ZLIB) +endif() if(ENABLE_ZLIB_UNCOMPRESS) set(poppler_SRCS ${poppler_SRCS} poppler/FlateStream.cc ) -endif(ENABLE_ZLIB_UNCOMPRESS) +endif() if(ENABLE_LIBCURL) set(poppler_SRCS ${poppler_SRCS} poppler/CurlCachedFile.cc poppler/CurlPDFDocBuilder.cc ) set(poppler_LIBS ${poppler_LIBS} ${CURL_LIBRARIES}) -endif(ENABLE_LIBCURL) +endif() if (ENABLE_NSS3) set(poppler_SRCS ${poppler_SRCS} poppler/SignatureHandler.cc ) set(poppler_LIBS ${poppler_LIBS} ${NSS3_LIBRARIES}) -endif(ENABLE_NSS3) +endif() if(LIBOPENJPEG_FOUND) set(poppler_SRCS ${poppler_SRCS} poppler/JPEG2000Stream.cc @@ -509,23 +509,23 @@ endif() if(USE_CMS) if(LCMS_FOUND) set(poppler_LIBS ${poppler_LIBS} ${LCMS_LIBRARIES}) - endif(LCMS_FOUND) + endif() if(LCMS2_FOUND) set(poppler_LIBS ${poppler_LIBS} ${LCMS2_LIBRARIES}) - endif(LCMS2_FOUND) -endif(USE_CMS) + endif() +endif() if(WIN32) # use clean APIs add_definitions(-DWIN32_LEAN_AND_MEAN) # gdi32 is needed under win32 set(poppler_LIBS ${poppler_LIBS} gdi32) -endif(WIN32) +endif() if(PNG_FOUND) set(poppler_LIBS ${poppler_LIBS} ${PNG_LIBRARIES}) -endif(PNG_FOUND) +endif() if(TIFF_FOUND) set(poppler_LIBS ${poppler_LIBS} ${TIFF_LIBRARIES}) -endif(TIFF_FOUND) +endif() if(HAVE_PTHREAD) set(poppler_LIBS ${poppler_LIBS} ${CMAKE_THREAD_LIBS_INIT}) endif() @@ -534,9 +534,9 @@ if(MSVC) add_definitions(-D_CRT_SECURE_NO_WARNINGS) set(CMAKE_CXX_FLAGS "/Zc:wchar_t- ${CMAKE_CXX_FLAGS}") add_library(poppler STATIC ${poppler_SRCS}) -else(MSVC) +else() add_library(poppler SHARED ${poppler_SRCS}) -endif(MSVC) +endif() set_target_properties(poppler PROPERTIES VERSION 69.0.0 SOVERSION 69) target_link_libraries(poppler LINK_PRIVATE ${poppler_LIBS}) install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX}) @@ -638,17 +638,17 @@ if(ENABLE_XPDF_HEADERS) install(FILES goo/PNGWriter.h DESTINATION include/poppler/goo) - endif(PNG_FOUND) + endif() if(TIFF_FOUND) install(FILES goo/TiffWriter.h DESTINATION include/poppler/goo) - endif(TIFF_FOUND) + endif() if(JPEG_FOUND) install(FILES goo/JpegWriter.h DESTINATION include/poppler/goo) - endif(JPEG_FOUND) + endif() install(FILES fofi/FoFiBase.h fofi/FoFiEncodings.h @@ -662,7 +662,7 @@ if(ENABLE_XPDF_HEADERS) poppler/CurlCachedFile.h poppler/CurlPDFDocBuilder.h DESTINATION include/poppler) - endif(ENABLE_LIBCURL) + endif() if(LIBOPENJPEG_FOUND) install(FILES poppler/JPEG2000Stream.h @@ -705,59 +705,59 @@ if(ENABLE_XPDF_HEADERS) splash/SplashXPath.h splash/SplashXPathScanner.h DESTINATION include/poppler/splash) - endif(ENABLE_SPLASH) -endif(ENABLE_XPDF_HEADERS) + endif() +endif() if(ENABLE_UTILS) add_subdirectory(utils) -endif(ENABLE_UTILS) +endif() if(ENABLE_GLIB) add_subdirectory(glib) -endif(ENABLE_GLIB) +endif() add_subdirectory(test) if(QT4_FOUND) add_subdirectory(qt4) -endif(QT4_FOUND) +endif() if(QT5_FOUND) add_subdirectory(qt5) -endif(QT5_FOUND) +endif() if(ENABLE_CPP) add_subdirectory(cpp) -endif(ENABLE_CPP) +endif() set(PKG_CONFIG_VERSION_0_18 TRUE) if(PKG_CONFIG_EXECUTABLE) exec_program(${PKG_CONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _output_VAR) macro_ensure_version("0.18" "${_output_VAR}" PKG_CONFIG_VERSION_0_18) -endif(PKG_CONFIG_EXECUTABLE) +endif() if(PKG_CONFIG_VERSION_0_18) set(PC_REQUIRES "") set(PC_REQUIRES_PRIVATE "Requires.private: poppler = ${POPPLER_VERSION}") -else(PKG_CONFIG_VERSION_0_18) +else() set(PC_REQUIRES "poppler = ${POPPLER_VERSION}") set(PC_REQUIRES_PRIVATE "") -endif(PKG_CONFIG_VERSION_0_18) +endif() poppler_create_install_pkgconfig(poppler.pc lib${LIB_SUFFIX}/pkgconfig) if(ENABLE_SPLASH) poppler_create_install_pkgconfig(poppler-splash.pc lib${LIB_SUFFIX}/pkgconfig) -endif(ENABLE_SPLASH) +endif() if(QT4_FOUND) poppler_create_install_pkgconfig(poppler-qt4.pc lib${LIB_SUFFIX}/pkgconfig) -endif(QT4_FOUND) +endif() if(QT5_FOUND) poppler_create_install_pkgconfig(poppler-qt5.pc lib${LIB_SUFFIX}/pkgconfig) -endif(QT5_FOUND) +endif() if(ENABLE_GLIB) poppler_create_install_pkgconfig(poppler-glib.pc lib${LIB_SUFFIX}/pkgconfig) -endif(ENABLE_GLIB) +endif() if(CAIRO_FOUND) poppler_create_install_pkgconfig(poppler-cairo.pc lib${LIB_SUFFIX}/pkgconfig) -endif(CAIRO_FOUND) +endif() if(ENABLE_CPP) poppler_create_install_pkgconfig(poppler-cpp.pc lib${LIB_SUFFIX}/pkgconfig) -endif(ENABLE_CPP) +endif() message("Building Poppler with support for:") @@ -790,20 +790,20 @@ endif() show_end_message_yesno("use cms" USE_CMS) if(LCMS_FOUND) message(" with lcms1") -endif(LCMS_FOUND) +endif() if(LCMS2_FOUND) message(" with lcms2") -endif(LCMS2_FOUND) +endif() show_end_message_yesno("command line utils" ENABLE_UTILS) show_end_message("test data dir" ${TESTDATADIR}) if(NOT ENABLE_SPLASH AND NOT CAIRO_FOUND) message("Warning: There is no rendering backend enabled") -endif(NOT ENABLE_SPLASH AND NOT CAIRO_FOUND) +endif() if(USE_FIXEDPOINT AND USE_FLOAT) message("Warning: Single precision and fixed point options should not be enabled at the same time") -endif(USE_FIXEDPOINT AND USE_FLOAT) +endif() if(NOT ENABLE_LIBJPEG AND HAVE_DCT_DECODER) message("Warning: Using libjpeg is recommended. The internal DCT decoder is unmaintained.") @@ -815,7 +815,7 @@ endif() if(ENABLE_ZLIB_UNCOMPRESS) message("Warning: Using zlib is not totally safe") -endif(ENABLE_ZLIB_UNCOMPRESS) +endif() if(NOT WITH_OPENJPEG AND HAVE_JPX_DECODER) message("Warning: Using libopenjpeg2 is recommended. The internal JPX decoder is unmaintained.") diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index 6ea24a58..72c1251a 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -14,7 +14,7 @@ macro(CPP_ADD_SIMPLETEST exe) target_link_libraries(${exe} poppler-cpp) if(MSVC) target_link_libraries(${exe} poppler ${poppler_LIBS}) - endif(MSVC) + endif() endmacro(CPP_ADD_SIMPLETEST) diff --git a/glib/CMakeLists.txt b/glib/CMakeLists.txt index 8433d2a3..26724ec1 100644 --- a/glib/CMakeLists.txt +++ b/glib/CMakeLists.txt @@ -16,7 +16,7 @@ configure_file(poppler-features.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/poppler-feat if (GTK_FOUND AND BUILD_GTK_TESTS) add_subdirectory(demo) -endif (GTK_FOUND AND BUILD_GTK_TESTS) +endif () set(poppler_glib_public_headers poppler-action.h diff --git a/qt4/src/CMakeLists.txt b/qt4/src/CMakeLists.txt index 18c35f8c..b803f755 100644 --- a/qt4/src/CMakeLists.txt +++ b/qt4/src/CMakeLists.txt @@ -34,7 +34,7 @@ set_target_properties(poppler-qt4 PROPERTIES VERSION 4.11.0 SOVERSION 4) target_link_libraries(poppler-qt4 poppler ${QT4_QTCORE_LIBRARY} ${QT4_QTGUI_LIBRARY} ${QT4_QTXML_LIBRARY}) if(MSVC) target_link_libraries(poppler-qt4 poppler ${poppler_LIBS}) -endif(MSVC) +endif() install(TARGETS poppler-qt4 RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX}) install(FILES diff --git a/qt4/tests/CMakeLists.txt b/qt4/tests/CMakeLists.txt index bba868f1..a01a638a 100644 --- a/qt4/tests/CMakeLists.txt +++ b/qt4/tests/CMakeLists.txt @@ -17,7 +17,7 @@ macro(QT4_ADD_SIMPLETEST exe source) target_link_libraries(${exe} poppler-qt4) if(MSVC) target_link_libraries(${exe} poppler ${poppler_LIBS}) - endif(MSVC) + endif() endmacro(QT4_ADD_SIMPLETEST) macro(QT4_ADD_QTEST exe source) @@ -31,8 +31,8 @@ macro(QT4_ADD_QTEST exe source) target_link_libraries(${exe} poppler-qt4 ${QT4_QTTEST_LIBRARY}) if(MSVC) target_link_libraries(${exe} poppler ${poppler_LIBS}) - endif(MSVC) - endif (QT4_QTTEST_FOUND) + endif() + endif () endmacro(QT4_ADD_QTEST) @@ -64,4 +64,4 @@ qt4_add_qtest(check_qt4_pagelabelinfo check_pagelabelinfo.cpp) qt4_add_qtest(check_qt4_goostring check_goostring.cpp) if (NOT WIN32) qt4_add_qtest(check_qt4_strings check_strings.cpp) -endif (NOT WIN32) +endif () diff --git a/qt5/src/CMakeLists.txt b/qt5/src/CMakeLists.txt index b39ad021..e88157e4 100644 --- a/qt5/src/CMakeLists.txt +++ b/qt5/src/CMakeLists.txt @@ -34,7 +34,7 @@ set_target_properties(poppler-qt5 PROPERTIES VERSION 1.10.0 SOVERSION 1) target_link_libraries(poppler-qt5 poppler ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Xml_LIBRARIES}) if(MSVC) target_link_libraries(poppler-qt5 poppler ${poppler_LIBS}) -endif(MSVC) +endif() install(TARGETS poppler-qt5 RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX}) install(FILES diff --git a/qt5/tests/CMakeLists.txt b/qt5/tests/CMakeLists.txt index b8f19265..01a1a970 100644 --- a/qt5/tests/CMakeLists.txt +++ b/qt5/tests/CMakeLists.txt @@ -25,7 +25,7 @@ macro(QT5_ADD_SIMPLETEST exe source) target_link_libraries(${exe} poppler-qt5 ${Qt5Widgets_LIBRARIES}) if(MSVC) target_link_libraries(${exe} poppler ${poppler_LIBS}) - endif(MSVC) + endif() endmacro(QT5_ADD_SIMPLETEST) macro(QT5_ADD_QTEST exe source) @@ -38,8 +38,8 @@ macro(QT5_ADD_QTEST exe source) target_link_libraries(${exe} poppler-qt5 ${Qt5Widgets_LIBRARIES} ${Qt5Test_LIBRARIES} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES}) if(MSVC) target_link_libraries(${exe} poppler ${poppler_LIBS}) - endif(MSVC) - endif (Qt5Test_FOUND) + endif() + endif () endmacro(QT5_ADD_QTEST) @@ -71,4 +71,4 @@ qt5_add_qtest(check_qt5_pagelabelinfo check_pagelabelinfo.cpp) qt5_add_qtest(check_qt5_goostring check_goostring.cpp) if (NOT WIN32) qt5_add_qtest(check_qt5_strings check_strings.cpp) -endif (NOT WIN32) +endif () diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a89a4cfb..0d8aa44d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -10,10 +10,10 @@ if (ENABLE_SPLASH) target_link_libraries(perf-test poppler) if (LIB_RT_HAS_NANOSLEEP) target_link_libraries(perf-test rt) - endif (LIB_RT_HAS_NANOSLEEP) - endif (HAVE_NANOSLEEP OR LIB_RT_HAS_NANOSLEEP) + endif () + endif () -endif (ENABLE_SPLASH) +endif () if (GTK_FOUND) @@ -38,9 +38,9 @@ if (GTK_FOUND) poppler_add_test(pdf-inspector BUILD_GTK_TESTS ${pdf_inspector_SRCS}) target_link_libraries(pdf-inspector poppler-glib ${GTK3_LIBRARIES}) - endif (HAVE_CAIRO) + endif () -endif (GTK_FOUND) +endif () set (pdf_fullrewrite_SRCS pdf-fullrewrite.cc diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index af811611..2925eb25 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -15,7 +15,7 @@ if (ENABLE_SPLASH) target_link_libraries(pdftoppm ${common_libs}) install(TARGETS pdftoppm DESTINATION bin) install(FILES pdftoppm.1 DESTINATION ${SHARE_INSTALL_DIR}/man/man1) -endif (ENABLE_SPLASH) +endif () if (HAVE_CAIRO) # pdftocairo @@ -36,16 +36,16 @@ if (HAVE_CAIRO) target_link_libraries(pdftocairo ${CAIRO_LIBRARIES} ${FREETYPE_LIBRARIES} ${common_libs}) if(LCMS_FOUND) target_link_libraries(pdftocairo ${LCMS_LIBRARIES}) - endif(LCMS_FOUND) + endif() if(HAVE_PTHREAD) target_link_libraries(pdftocairo ${CMAKE_THREAD_LIBS_INIT}) endif() if(LCMS2_FOUND) target_link_libraries(pdftocairo ${LCMS2_LIBRARIES}) - endif(LCMS2_FOUND) + endif() install(TARGETS pdftocairo DESTINATION bin) install(FILES pdftocairo.1 DESTINATION ${SHARE_INSTALL_DIR}/man/man1) -endif (HAVE_CAIRO) +endif () # pdfdetach set(pdfdetach_SOURCES ${common_srcs} @@ -97,7 +97,7 @@ if (ENABLE_NSS3) add_executable(pdfsig ${pdfsig_SOURCES}) target_link_libraries(pdfsig ${common_libs}) install(TARGETS pdfsig DESTINATION bin) -endif (ENABLE_NSS3) +endif () # pdftops set(pdftops_SOURCES ${common_srcs} commit 251bb42e9af251c86b8fec120e14972ac7c07106 Author: Albert Astals Cid <[email protected]> Date: Sun Sep 3 22:23:18 2017 +0200 Remove the check for cmake >= 2.8.8 since we're requiring 3.1 already diff --git a/CMakeLists.txt b/CMakeLists.txt index 4025a800..2ababd3b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,22 +130,17 @@ else() message(FATAL_ERROR "Invalid ENABLE_DCTDECODER value.") endif() macro_optional_find_package(Qt4) -if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.8.7) - find_package(Qt5Core) - find_package(Qt5Gui) - find_package(Qt5Xml) - find_package(Qt5Widgets) - find_package(Qt5Test) - if (Qt5Core_FOUND AND Qt5Gui_FOUND AND Qt5Xml_FOUND AND Qt5Widgets_FOUND AND Qt5Test_FOUND) - set(QT5_FOUND true) - else () - message("-- Package Qt5Core or Qt5Gui or Qt5Xml or Qt5Widgets or Qt5Test not found") - set(QT5_FOUND false) - endif() -else(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.8.7) +find_package(Qt5Core) +find_package(Qt5Gui) +find_package(Qt5Xml) +find_package(Qt5Widgets) +find_package(Qt5Test) +if (Qt5Core_FOUND AND Qt5Gui_FOUND AND Qt5Xml_FOUND AND Qt5Widgets_FOUND AND Qt5Test_FOUND) + set(QT5_FOUND true) +else () + message("-- Package Qt5Core or Qt5Gui or Qt5Xml or Qt5Widgets or Qt5Test not found") set(QT5_FOUND false) - message("-- CMake >= 2.8.8 is needed to enable Qt5") -endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.8.7) +endif() macro_optional_find_package(Cairo ${CAIRO_VERSION}) if(CAIRO_FOUND) _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
