diff --git a/CMakeLists.txt b/CMakeLists.txt index f39bb171..5ebc5b74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index 0d678961..32ca3d8c 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -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)