vcpkg/ports/saucer/fix-source-generation.patch
Jack·Boos·Yu 11461d415a
[vcpkg baseline][saucer] Re-fix configure error ()
* [sacuer] Re-fix configure error

* version
2022-09-19 11:06:40 -07:00

22 lines
1.2 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3800146..61a9e60 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,7 +80,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE "include/saucer")
# --------------------------------------------------------------------------------------------------------
string(TOLOWER ${saucer_backend} saucer_backed_lower)
-configure_file("constants.hpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/include/saucer/constants.hpp")
+configure_file("constants.hpp.in" "${CMAKE_BINARY_DIR}/include/saucer/constants.hpp")
# --------------------------------------------------------------------------------------------------------
# Configure Library depending on options
@@ -91,6 +91,7 @@ include(FetchContent)
if (saucer_backend STREQUAL "Qt")
target_sources(${PROJECT_NAME} PRIVATE "src/webview.qt5.cpp" "src/window.qt5.cpp")
target_sources(${PROJECT_NAME} PRIVATE "src/webview.qt5.impl.hpp" "src/window.qt5.impl.hpp")
+ target_sources(${PROJECT_NAME} PRIVATE "${CMAKE_BINARY_DIR}/include/saucer/constants.hpp")
find_package(Qt5 COMPONENTS Widgets WebEngineWidgets WebChannel REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Widgets Qt5::WebEngineWidgets Qt5::WebChannel)