make json library exported

This commit is contained in:
matcool 2023-05-24 16:17:58 -03:00
parent d9c775651e
commit a2b8f2721a
No known key found for this signature in database
GPG key ID: BF58756086D7AB1C
2 changed files with 6 additions and 1 deletions

View file

@ -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)

View file

@ -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)