vcpkg/ports/libx11/vcpkg-cmake-wrapper.cmake
Alexander Neumann 6f7ffeb18f
[many ports] Add X windows part 11/N (#27441)
* [libice] replace macros with typedefs

* [libx11] fix dl linkage on linux and cleanup the cmake wrapper.

* [libxxf86vm] add port

* [libxtst] add port

* [libxt] add port

* [libxmu] add port

* [libxaw] add port

* bump port version

* v db

* fix libxpm and maybe cross libxt

* malloc returns null for cross builds

* fix typo

* fix stuff

* v db

* fix stuff ?

* WIP commit

* libxt cross fix

* add todo

* fix libxaw

* xcb add some fixes.

* fix todos

* fix arm ?

* fix path

* bump some versions

* shorten comment

* format manifest

* v db

* fix stuff

* ci baseline

* v db

* adjust libx11 wrapper again

* v db

* add license

* remove doubled entry from v db

* v db

* libxmu remove global variable.

* correctly split unistd.patch and apply it

* disable thread safe init in libx11 on windows

* v db

* libx11 append options correctly.

* v db

* still not correct.

* v db
2022-11-11 17:32:25 -08:00

20 lines
694 B
CMake

set(Z_VCPKG_FIRST_X11_SEARCH OFF)
if(NOT X11_FOUND)
set(Z_VCPKG_FIRST_X11_SEARCH ON)
endif()
_find_package(${ARGS})
if(TARGET X11::X11 AND Z_VCPKG_FIRST_X11_SEARCH)
target_link_libraries(X11::X11 INTERFACE ${CMAKE_DL_LIBS})
if(TARGET X11::xcb)
target_link_libraries(X11::X11 INTERFACE X11::xcb)
endif()
endif()
if(TARGET X11::xcb AND Z_VCPKG_FIRST_X11_SEARCH)
if(TARGET X11::Xdmcp)
set_property(TARGET X11::xcb APPEND PROPERTY INTERFACE_LINK_LIBRARIES X11::Xdmcp)
endif()
if(TARGET X11::Xau)
set_property(TARGET X11::xcb APPEND PROPERTY INTERFACE_LINK_LIBRARIES X11::Xau)
endif()
endif()
unset(Z_VCPKG_FIRST_X11_SEARCH)