Skip to content

Commit

Permalink
make json library exported
Browse files Browse the repository at this point in the history
  • Loading branch information
matcool committed May 24, 2023
1 parent d9c7756 commit a2b8f27
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,15 @@ include(cmake/GeodeFile.cmake)
include(cmake/Platform.cmake)
include(cmake/CPM.cmake)

if (PROJECT_IS_TOP_LEVEL AND NOT GEODE_BUILDING_DOCS)
set(MAT_JSON_AS_INTERFACE ON)
endif()
CPMAddPackage("gh:geode-sdk/json#19cf6f4")
CPMAddPackage("gh:fmtlib/fmt#9.1.0")
CPMAddPackage("gh:gulrak/filesystem#3e5b930")

target_compile_definitions(${PROJECT_NAME} INTERFACE MAT_JSON_DYNAMIC=1)

# this is needed for cross compilation on linux,
# since fmtlib will fail to compile otherwise
if (GEODE_DISABLE_FMT_CONSTEVAL)
Expand Down
2 changes: 1 addition & 1 deletion loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ if (APPLE)
#set_property(TARGET ${PROJECT_NAME} PROPERTY RULE_LAUNCH_COMPILE "${CMAKE_COMMAND} -E time")
endif()

target_compile_definitions(${PROJECT_NAME} PUBLIC GEODE_EXPORTING)
target_compile_definitions(${PROJECT_NAME} PUBLIC GEODE_EXPORTING MAT_JSON_EXPORTING)

# These are only needed for building source :-)
if (NOT GEODE_BUILDING_DOCS)
Expand Down

0 comments on commit a2b8f27

Please sign in to comment.