mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 10:05:19 +08:00
38 lines
1.6 KiB
Diff
38 lines
1.6 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index f9b5557..ebc624b 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -1045,8 +1045,8 @@ file(RELATIVE_PATH
|
|
"${LWS_ABSOLUTE_INSTALL_CMAKE_DIR}"
|
|
"${LWS_ABSOLUTE_INSTALL_INCLUDE_DIR}") # Calculate the relative directory from the cmake dir.
|
|
|
|
-if (DEFINED REL_INCLUDE_DIR)
|
|
- set(LWS__INCLUDE_DIRS "\${LWS_CMAKE_DIR}/${REL_INCLUDE_DIR}")
|
|
+if (1)
|
|
+ set(LWS__INCLUDE_DIRS "\${CMAKE_CURRENT_LIST_DIR}/../include")
|
|
endif()
|
|
|
|
configure_file(${PROJECT_SOURCE_DIR}/cmake/libwebsockets-config.cmake.in
|
|
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
|
|
index 85b43d5..724f0b7 100644
|
|
--- a/lib/CMakeLists.txt
|
|
+++ b/lib/CMakeLists.txt
|
|
@@ -164,7 +164,7 @@ if (LWS_WITH_STATIC)
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../include>
|
|
)
|
|
- target_include_directories(websockets PRIVATE ${LWS_LIB_BUILD_INC_PATHS})
|
|
+ target_include_directories(websockets PRIVATE $<BUILD_INTERFACE:${LWS_LIB_BUILD_INC_PATHS}> PUBLIC $<INSTALL_INTERFACE:include>)
|
|
target_compile_definitions(websockets PRIVATE LWS_BUILDING_STATIC)
|
|
|
|
if (WIN32)
|
|
@@ -190,7 +190,7 @@ if (LWS_WITH_SHARED)
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../include>
|
|
)
|
|
- target_include_directories(websockets_shared PRIVATE ${LWS_LIB_BUILD_INC_PATHS})
|
|
+ target_include_directories(websockets_shared PRIVATE $<BUILD_INTERFACE:${LWS_LIB_BUILD_INC_PATHS}> PUBLIC $<INSTALL_INTERFACE:include>)
|
|
target_compile_definitions(websockets_shared PRIVATE LWS_BUILDING_SHARED)
|
|
|
|
# We want the shared lib to be named "libwebsockets"
|