mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
* Forward CMake environment flags to libjpeg tests * Forward CMake environment flags to libpng tests
This commit is contained in:
parent
1b83016abd
commit
e30f5e2fe8
@ -16,11 +16,17 @@ endif()
|
||||
|
||||
find_package(JPEG QUIET)
|
||||
|
||||
if(JPEG_FOUND)
|
||||
if(JPEG_FOUND)
|
||||
set(JPEG_TEST_CMAKE_FLAGS
|
||||
"-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}"
|
||||
"-DCMAKE_INCLUDE_PATH=${CMAKE_INCLUDE_PATH}"
|
||||
"-DCMAKE_LIBRARY_PATH=${CMAKE_LIBRARY_PATH}")
|
||||
|
||||
try_compile(test_for_libjpeg_worked
|
||||
${PROJECT_BINARY_DIR}/test_for_libjpeg_build
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_for_libjpeg
|
||||
test_if_libjpeg_is_broken)
|
||||
test_if_libjpeg_is_broken
|
||||
CMAKE_FLAGS "${JPEG_TEST_CMAKE_FLAGS}")
|
||||
|
||||
message (STATUS "Found system copy of libjpeg: ${JPEG_LIBRARY}")
|
||||
if(NOT test_for_libjpeg_worked)
|
||||
|
@ -16,11 +16,17 @@ endif()
|
||||
|
||||
find_package(PNG QUIET)
|
||||
|
||||
if(PNG_FOUND)
|
||||
if(PNG_FOUND)
|
||||
set(PNG_TEST_CMAKE_FLAGS
|
||||
"-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}"
|
||||
"-DCMAKE_INCLUDE_PATH=${CMAKE_INCLUDE_PATH}"
|
||||
"-DCMAKE_LIBRARY_PATH=${CMAKE_LIBRARY_PATH}")
|
||||
|
||||
try_compile(test_for_libpng_worked
|
||||
${PROJECT_BINARY_DIR}/test_for_libpng_build
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_for_libpng
|
||||
test_if_libpng_is_broken)
|
||||
test_if_libpng_is_broken
|
||||
CMAKE_FLAGS "${PNG_TEST_CMAKE_FLAGS}")
|
||||
|
||||
message (STATUS "Found system copy of libpng: ${PNG_LIBRARIES}")
|
||||
if(NOT test_for_libpng_worked)
|
||||
|
Loading…
Reference in New Issue
Block a user