Added interface target to config file for cmake versions > 3.0
This commit is contained in:
1 parent
73c3b81411
commit
59fb9ece5d
1 file changed
+6
@@ -6,3 +6,9 @@
|
||||
@PACKAGE_INIT@
|
||||
set_and_check(WEBSOCKETPP_INCLUDE_DIR "@PACKAGE_INSTALL_INCLUDE_DIR@")
|
||||
set(WEBSOCKETPP_FOUND TRUE)
|
||||
|
||||
#This is a bit of a hack, but it works well. It also allows continued support of CMake 2.8
|
||||
if(${CMAKE_VERSION} VERSION_GREATER 3.0.0 OR ${CMAKE_VERSION} VERSION_EQUAL 3.0.0)
|
||||
add_library(websocketpp::websocketpp INTERFACE IMPORTED)
|
||||
set_target_properties(websocketpp::websocketpp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${WEBSOCKETPP_INCLUDE_DIR}")
|
||||
endif()
|
||||
Reference in new issue
Block a user