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)
### PThread is required when using X11 display engine ###
find_package (PTHREAD QUIET)
if (PTHREAD_FOUND)
set (CIMG_INCLUDE_DIRS ${CIMG_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIRS})
set (CIMG_LIBRARIES ${CIMG_LIBRARIES} ${PTHREAD_LIBRARIES})
find_package (Threads QUIET)
if (Threads_FOUND)
set (CIMG_INCLUDE_DIRS ${CIMG_INCLUDE_DIRS})
set (CIMG_LIBRARIES ${CIMG_LIBRARIES} Threads::Threads)
message(STATUS "FindCImg.cmake: pthread found")
else (PTHREAD_FOUND)
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")
set (CIMG_DEFINITIONS ${CIMG_DEFINITIONS} -Dcimg_display=0)
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()