forked from lijiext/lammps
cmake: JPEG imported target is >=cmake-3.12 only
This commit is contained in:
parent
6ee25db32a
commit
9b8266173f
|
@ -284,7 +284,12 @@ option(WITH_JPEG "Enable JPEG support" ${JPEG_FOUND})
|
|||
if(WITH_JPEG)
|
||||
find_package(JPEG REQUIRED)
|
||||
add_definitions(-DLAMMPS_JPEG)
|
||||
target_link_libraries(lammps PRIVATE JPEG::JPEG)
|
||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
||||
include_directories(${JPEG_INCLUDE_DIR})
|
||||
target_link_libraries(lammps PRIVATE ${JPEG_LIBRARIES})
|
||||
else()
|
||||
target_link_libraries(lammps PRIVATE JPEG::JPEG)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(PNG QUIET)
|
||||
|
|
Loading…
Reference in New Issue