Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/zint/cmake/zint_add_test.cmake @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 # Copyright (C) 2021-2024 Robin Stuart <rstuart114@gmail.com> | |
| 2 # Adapted from qrencode/tests/CMakeLists.txt | |
| 3 # Copyright (C) 2006-2017 Kentaro Fukuchi <kentaro@fukuchi.org> | |
| 4 # vim: set ts=4 sw=4 et : | |
| 5 | |
| 6 macro(zint_add_test test_name test_command) | |
| 7 set(ADDITIONAL_LIBS "${ARGN}" ${LIBRARY_FLAGS}) | |
| 8 if(ZINT_SHARED) | |
| 9 add_executable(${test_command} ${test_command}.c) | |
| 10 target_link_libraries(${test_command} testcommon ${ADDITIONAL_LIBS}) | |
| 11 if(NOT (ZINT_USE_PNG AND PNG_FOUND)) | |
| 12 target_compile_definitions(${test_command} PRIVATE ZINT_NO_PNG) | |
| 13 endif() | |
| 14 add_test(${test_name} ${test_command}) | |
| 15 if(MSVC) | |
| 16 set_tests_properties(${test_name} PROPERTIES ENVIRONMENT | |
| 17 "CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR};PATH=${CMAKE_BINARY_DIR}/backend/${CMAKE_BUILD_TYPE}\;${CMAKE_BINARY_DIR}/frontend/${CMAKE_BUILD_TYPE}\;$ENV{PATH}") | |
| 18 else() | |
| 19 set_tests_properties(${test_name} PROPERTIES ENVIRONMENT | |
| 20 "CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR};LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/backend;PATH=${CMAKE_BINARY_DIR}/frontend:$ENV{PATH}") | |
| 21 endif() | |
| 22 endif() | |
| 23 if(ZINT_STATIC) | |
| 24 add_executable(${test_command}-static ${test_command}.c) | |
| 25 target_link_libraries(${test_command}-static testcommon-static ${ADDITIONAL_LIBS}) | |
| 26 if(NOT (ZINT_USE_PNG AND PNG_FOUND)) | |
| 27 target_compile_definitions(${test_command}-static PRIVATE ZINT_NO_PNG) | |
| 28 endif() | |
| 29 add_test(${test_name}-static ${test_command}-static) | |
| 30 if(MSVC) | |
| 31 set_tests_properties(${test_name}-static PROPERTIES ENVIRONMENT | |
| 32 "CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR};PATH=${CMAKE_BINARY_DIR}/backend/${CMAKE_BUILD_TYPE}\;${CMAKE_BINARY_DIR}/frontend/${CMAKE_BUILD_TYPE}\;$ENV{PATH}") | |
| 33 else() | |
| 34 set_tests_properties(${test_name}-static PROPERTIES ENVIRONMENT | |
| 35 "CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR};LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/backend;PATH=${CMAKE_BINARY_DIR}/frontend:$ENV{PATH}") | |
| 36 endif() | |
| 37 endif() | |
| 38 endmacro() |
