diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e886ed..6f5d4a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,8 @@ set(BUILD_STATIC OFF CACHE BOOL "") option(USE_VGMSTREAM "Enable using the VGMStream libraries (Unimplemented)" OFF) find_package(PkgConfig) -add_subdirectory(subprojects/jsoncpp) +pkg_check_modules(jsoncpp IMPORTED_TARGET jsoncpp) +#add_subdirectory(subprojects/jsoncpp) find_package(SDL2 REQUIRED) find_package(sdbus-c++ REQUIRED) include(GNUInstallDirs) @@ -146,9 +147,9 @@ if(${ASCLI_EXE} STREQUAL "ASCLIEXE-NOTFOUND") else() add_test(NAME "verify appstream metadata" COMMAND ${ASCLI_EXE} validate --no-net --pedantic "assets/com.complecwaft.Looper.metainfo.xml") 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(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.metainfo.xml DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo) -install(DIRECTORY assets/translations/ TYPE LOCALE PATTERN "*" EXCLUDE PATTERN "looper.pot") \ No newline at end of file +install(DIRECTORY assets/translations/ TYPE LOCALE PATTERN "*" EXCLUDE PATTERN "looper.pot")