File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -144,10 +144,18 @@ if(NOT WIN32)
144144 find_package (X11)
145145 if (X11_FOUND)
146146 target_compile_definitions (cimg INTERFACE cimg_display=1)
147- target_compile_definitions (cimg INTERFACE cimg_use_xshm cimg_use_xrandr)
148- # https://github.com/alandefreitas/matplotplusplus/issues/6
149- target_link_libraries (cimg INTERFACE ${X11_LIBRARIES} X11::Xrandr)
150- target_include_directories (cimg INTERFACE ${X11_INCLUDE_DIRS} )
147+ target_include_directories (cimg INTERFACE ${X11_X11_INCLUDE_PATH} )
148+ target_link_libraries (cimg INTERFACE ${X11_X11_LIB} )
149+ if (X11_XShm_FOUND)
150+ target_compile_definitions (cimg INTERFACE cimg_use_xshm)
151+ target_include_directories (cimg INTERFACE ${X11_XShm_INCLUDE_PATH} )
152+ target_link_libraries (cimg INTERFACE ${X11_Xext_LIB} )
153+ endif ()
154+ if (X11_Xrandr_FOUND)
155+ target_compile_definitions (cimg INTERFACE cimg_use_xrandr)
156+ target_include_directories (cimg INTERFACE ${X11_Xrandr_INCLUDE_DIR} )
157+ target_link_libraries (cimg INTERFACE ${X11_Xrandr_LIB} )
158+ endif ()
151159 else ()
152160 target_compile_definitions (cimg INTERFACE cimg_display=0)
153161 endif ()
You can’t perform that action at this time.
0 commit comments