|
@@ -36,26 +36,26 @@ else()
|
|
set(PNG_BUILD_ZLIB ON CACHE BOOL "build zlib ourselves")
|
|
set(PNG_BUILD_ZLIB ON CACHE BOOL "build zlib ourselves")
|
|
add_subdirectory(zlib-1.2.11)
|
|
add_subdirectory(zlib-1.2.11)
|
|
set(ZLIB_LIBRARY zlibstatic)
|
|
set(ZLIB_LIBRARY zlibstatic)
|
|
- #foreach(header ${ZLIB_PUBLIC_HDRS})
|
|
|
|
- # get_filename_component(the_incluude ${header} DIRECTORY)
|
|
|
|
- # list(APPEND ZLIB_PUB_INCLUDE ${the_incluude})
|
|
|
|
- #endforeach()
|
|
|
|
- #set(ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/zlib-1.2.11 ${ZLIB_PUB_INCLUDE} )
|
|
|
|
|
|
+ foreach(header ${ZLIB_PUBLIC_HDRS})
|
|
|
|
+ get_filename_component(the_incluude ${header} DIRECTORY)
|
|
|
|
+ list(APPEND ZLIB_PUB_INCLUDE ${the_incluude})
|
|
|
|
+ endforeach()
|
|
|
|
+ set(ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/zlib-1.2.11 ${ZLIB_PUB_INCLUDE} )
|
|
|
|
|
|
set(SKIP_INSTALL_ALL ON)
|
|
set(SKIP_INSTALL_ALL ON)
|
|
add_subdirectory(lpng1637)
|
|
add_subdirectory(lpng1637)
|
|
- #foreach(header ${libpng_public_hdrs})
|
|
|
|
- # get_filename_component(the_incluude ${header} DIRECTORY)
|
|
|
|
- # list(APPEND PNG_PUB_INCLUDE ${the_incluude})
|
|
|
|
- #endforeach()
|
|
|
|
- target_link_libraries(png_static PRIVATE zlibstatic)
|
|
|
|
- #target_include_directories(libalmond PRIVATE ${PNG_PUB_INCLUDE})
|
|
|
|
- #target_include_directories(libalmond PRIVATE ${ZLIB_INCLUDE_DIR})
|
|
|
|
|
|
+ foreach(header ${libpng_public_hdrs})
|
|
|
|
+ get_filename_component(the_incluude ${header} DIRECTORY)
|
|
|
|
+ list(APPEND PNG_PUB_INCLUDE ${the_incluude})
|
|
|
|
+ endforeach()
|
|
|
|
+ #target_link_libraries(png_static PRIVATE zlibstatic)
|
|
|
|
+ target_include_directories(libalmond PRIVATE ${PNG_PUB_INCLUDE})
|
|
|
|
+ target_include_directories(libalmond PRIVATE ${ZLIB_INCLUDE_DIR})
|
|
target_link_libraries(libalmond PRIVATE png_static)
|
|
target_link_libraries(libalmond PRIVATE png_static)
|
|
endif()
|
|
endif()
|
|
|
|
|
|
if (JPEG_FOUND AND WITH_LIBJPEG)
|
|
if (JPEG_FOUND AND WITH_LIBJPEG)
|
|
- target_link_libraries(libalmond PRIVATE JPEG::JPEG)
|
|
|
|
|
|
+ target_link_libraries(libalmond PUBLIC JPEG::JPEG)
|
|
target_compile_definitions(libalmond PUBLIC WITH_LIBJPEG)
|
|
target_compile_definitions(libalmond PUBLIC WITH_LIBJPEG)
|
|
endif()
|
|
endif()
|
|
|
|
|