ISCE_INSAR/.cmake/TargetX11.cmake

22 lines
545 B
CMake
Raw Normal View History

find_package(X11)
if(X11_FOUND)
2020-01-08 20:08:23 +00:00
set(X11_X11_FOUND TRUE)
foreach(component
2020-01-08 20:08:23 +00:00
X11
Xmu
Xt
)
2020-01-08 20:08:23 +00:00
if(X11_${component}_FOUND AND NOT TARGET X11::${component})
add_library(X11::${component} IMPORTED INTERFACE)
target_include_directories(X11::${component} SYSTEM
INTERFACE ${X11_${component}_INCLUDE_PATH})
target_link_libraries(X11::${component}
INTERFACE ${X11_${component}_LIB})
endif()
endforeach()
endif()