Skip to content

Commit 1fbd7f9

Browse files
committed
Prefix PUBLIC_HEADER with CMAKE_CURRENT_SOURCE_DIR
This is required to install the project when using cmake FetchContent, or it will complain about the file json-schema.hpp not found (because it will use a relative path to the project that called FetchContent instead of json-schema-validator path
1 parent fbd72de commit 1fbd7f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ target_include_directories(nlohmann_json_schema_validator PUBLIC
1212
)
1313

1414
set_target_properties(nlohmann_json_schema_validator PROPERTIES
15-
PUBLIC_HEADER nlohmann/json-schema.hpp)
15+
PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/nlohmann/json-schema.hpp)
1616

1717
# TODO: Why would this need to be if guarded?
1818
if (JSON_VALIDATOR_SHARED_LIBS)

0 commit comments

Comments
 (0)