Use system jsoncpp

This commit is contained in:
Zachary Hall 2024-04-10 13:57:18 -07:00
parent 514f30773a
commit c4414e6f7e

View file

@ -27,7 +27,8 @@ set(BUILD_STATIC OFF CACHE BOOL "")
option(USE_VGMSTREAM "Enable using the VGMStream libraries (Unimplemented)" OFF) option(USE_VGMSTREAM "Enable using the VGMStream libraries (Unimplemented)" OFF)
find_package(PkgConfig) find_package(PkgConfig)
add_subdirectory(subprojects/jsoncpp) pkg_check_modules(jsoncpp IMPORTED_TARGET jsoncpp)
#add_subdirectory(subprojects/jsoncpp)
find_package(SDL2 REQUIRED) find_package(SDL2 REQUIRED)
find_package(sdbus-c++ REQUIRED) find_package(sdbus-c++ REQUIRED)
include(GNUInstallDirs) include(GNUInstallDirs)
@ -146,9 +147,9 @@ if(${ASCLI_EXE} STREQUAL "ASCLIEXE-NOTFOUND")
else() else()
add_test(NAME "verify appstream metadata" COMMAND ${ASCLI_EXE} validate --no-net --pedantic "assets/com.complecwaft.Looper.metainfo.xml") add_test(NAME "verify appstream metadata" COMMAND ${ASCLI_EXE} validate --no-net --pedantic "assets/com.complecwaft.Looper.metainfo.xml")
endif() endif()
target_link_libraries(looper PUBLIC liblooper libvgmstream jsoncpp ${UI_BACKENDS}) target_link_libraries(looper PUBLIC liblooper libvgmstream PkgConfig::jsoncpp ${UI_BACKENDS})
install(TARGETS looper ${EXTRA_LIBS}) install(TARGETS looper ${EXTRA_LIBS})
install(FILES assets/icon.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps/) install(FILES assets/icon.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps/)
install(FILES assets/com.complecwaft.Looper.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) install(FILES assets/com.complecwaft.Looper.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
install(FILES assets/com.complecwaft.Looper.metainfo.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo) install(FILES assets/com.complecwaft.Looper.metainfo.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo)
install(DIRECTORY assets/translations/ TYPE LOCALE PATTERN "*" EXCLUDE PATTERN "looper.pot") install(DIRECTORY assets/translations/ TYPE LOCALE PATTERN "*" EXCLUDE PATTERN "looper.pot")