(cmake) make install cmake files optional to not conflict with vcpkg

See https://github.com/microsoft/vcpkg/pull/11030
This commit is contained in:
Benjamin Sergeant committed 2020-05-17 20:36:46 -07:00
1 parent ea207d8199
commit 54d4d81bf4
3 files changed
+12 -3

No files matched your search

+7 -2
View File
@@ -247,8 +247,13 @@ install(TARGETS ixwebsocket EXPORT ixwebsocket
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ixwebsocket/
)
install(EXPORT ixwebsocket NAMESPACE ixwebsocket:: DESTINATION lib/cmake/ixwebsocket)
export(EXPORT ixwebsocket NAMESPACE ixwebsocket:: FILE ixwebsocketConfig.cmake)
# This gets in the way of vcpkg in ways I do not know how to fix
# https://github.com/microsoft/vcpkg/pull/11030
# Maybe using vcpkg_fixup_cmake_targets could fix it
if (INSTALL_CMAKE_FILE)
install(EXPORT ixwebsocket NAMESPACE ixwebsocket:: DESTINATION lib/cmake/ixwebsocket)
export(EXPORT ixwebsocket NAMESPACE ixwebsocket:: FILE ixwebsocketConfig.cmake)
endif()
if (USE_WS OR USE_TEST)
add_subdirectory(ixcore)