mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-25 01:51:49 +08:00
Update FindCImg.cmake (#103)
* Update FindCImg.cmake * Update FindCImg.cmake
This commit is contained in:
parent
afbc565762
commit
e3cfac3f1d
@ -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()
|
||||
@ -135,4 +123,4 @@ if (CIMG_FOUND)
|
||||
target_compile_definitions(CImg::CImg INTERFACE ${CIMG_DEFINITIONS})
|
||||
target_link_libraries(CImg::CImg INTERFACE ${CIMG_LIBRARIES})
|
||||
target_include_directories(CImg::CImg INTERFACE ${CIMG_INCLUDE_DIRS})
|
||||
endif(CIMG_FOUND)
|
||||
endif(CIMG_FOUND)
|
||||
|
Loading…
Reference in New Issue
Block a user