Update FindCImg.cmake (#103)

* Update FindCImg.cmake

* Update FindCImg.cmake
This commit is contained in:
Alexander Neumann 2023-10-25 23:22:17 +02:00 committed by GitHub
parent afbc565762
commit e3cfac3f1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,10 +83,10 @@ if (CIMG_FOUND)
endif (X11_Xrandr_FOUND) endif (X11_Xrandr_FOUND)
### PThread is required when using X11 display engine ### ### PThread is required when using X11 display engine ###
find_package (PTHREAD QUIET) find_package (Threads QUIET)
if (PTHREAD_FOUND) if (Threads_FOUND)
set (CIMG_INCLUDE_DIRS ${CIMG_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS}) set (CIMG_INCLUDE_DIRS ${CIMG_INCLUDE_DIRS})
set (CIMG_LIBRARIES ${CIMG_LIBRARIES} ${PTHREAD_LIBRARIES}) set (CIMG_LIBRARIES ${CIMG_LIBRARIES} Threads::Threads)
message(STATUS "FindCImg.cmake: pthread found") message(STATUS "FindCImg.cmake: pthread found")
else (PTHREAD_FOUND) else (PTHREAD_FOUND)
message(STATUS "!!! FindCIMG.cmake !!! pthread NOT found. pthread required by cimg for running X11.") message(STATUS "!!! FindCIMG.cmake !!! pthread NOT found. pthread required by cimg for running X11.")
@ -98,18 +98,6 @@ if (CIMG_FOUND)
message(WARNING "FindCImg.cmake: display disabled") message(WARNING "FindCImg.cmake: display disabled")
set (CIMG_DEFINITIONS ${CIMG_DEFINITIONS} -Dcimg_display=0) set (CIMG_DEFINITIONS ${CIMG_DEFINITIONS} -Dcimg_display=0)
endif (X11_FOUND) endif (X11_FOUND)
else (UNIX OR APPLE)
if (WIN32)
find_package(GDI QUIET)
if (GDI_FOUND)
set (CIMG_LIBRARIES ${CIMG_LIBRARIES} ${GDI_LIBRARIES})
message(STATUS "FindCImg.cmake: GDI found")
else (GDI_FOUND)
message(STATUS "!!! FindCIMG.cmake !!! GDI NOT found.")
message(WARNING "FindCImg.cmake: display disabled")
set (CIMG_DEFINITIONS ${CIMG_DEFINITIONS} -Dcimg_display=0)
endif (GDI_FOUND)
endif (WIN32)
endif (UNIX OR APPLE) endif (UNIX OR APPLE)
endif() endif()