Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ else()
target_compile_definitions(boost_json PUBLIC BOOST_JSON_STATIC_LINK=1)
endif()

if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
option(BOOST_JSON_STANDALONE "Build boost::json as a static standalone library" FALSE)

if(BOOST_JSON_STANDALONE)
target_compile_features(boost_json PUBLIC cxx_std_17)
target_compile_definitions(boost_json PUBLIC BOOST_JSON_STANDALONE)
add_subdirectory(example)
elseif(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
#
# Root project such as on Travis or other CI,
# or when producing Visual Studio Solution and Projects
Expand Down