Skip to content

Commit 5cd760a

Browse files
Fix yaml-cpp platform compatibility issues
- Add YAML_CPP_STATIC_DEFINE to resolve Windows DLL export/import issues - Correct header path from include/yaml-cpp to yaml-cpp - These changes should resolve Windows/macOS build failures in CI Co-Authored-By: Jaime Mizrachi <[email protected]>
1 parent c426706 commit 5cd760a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

vendor/yaml-cpp/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ cmake_minimum_required(VERSION 3.12)
33

44
# Create yaml-cpp library
55
file(GLOB_RECURSE YAML_CPP_SOURCES "src/*.cpp")
6-
file(GLOB_RECURSE YAML_CPP_HEADERS "include/yaml-cpp/*.h")
6+
file(GLOB_RECURSE YAML_CPP_HEADERS "yaml-cpp/*.h")
77

88
add_library(yaml-cpp STATIC ${YAML_CPP_SOURCES} ${YAML_CPP_HEADERS})
99

1010
target_include_directories(yaml-cpp PUBLIC .)
1111

12+
# Define static library build to avoid DLL export/import issues
13+
target_compile_definitions(yaml-cpp PUBLIC YAML_CPP_STATIC_DEFINE)
14+
1215
# Set C++ standard
1316
target_compile_features(yaml-cpp PUBLIC cxx_std_11)
1417

@@ -20,4 +23,4 @@ else()
2023
endif()
2124

2225
# Install headers
23-
install(DIRECTORY include/yaml-cpp DESTINATION include)
26+
install(DIRECTORY yaml-cpp DESTINATION include)

0 commit comments

Comments
 (0)