Commit 5c8dfc90 authored by Albert Astals Cid's avatar Albert Astals Cid

Remove the old if/else cmake syntax

that was weird and forced you to replicate the if clause in the else and
endif
parent 251bb42e
This diff is collapsed.
......@@ -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)
......
......@@ -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
......
......@@ -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
......
......@@ -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 ()
......@@ -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
......
......@@ -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 ()
......@@ -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
......
......@@ -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}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment