cmake_minimum_required(VERSION 3.30) project(gpanthera) set(CMAKE_CXX_STANDARD 20) set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--export-dynamic") add_library(gpanthera SHARED gpanthera.cc) add_library(test_plugin SHARED test_plugin.cc) add_executable(panthera-www panthera-www.cc) target_link_libraries(panthera-www gpanthera) target_link_libraries(panthera-www webkitgtk-6.0) target_link_libraries(panthera-www nlohmann_json::nlohmann_json) target_link_libraries(panthera-www sqlite3) find_package(PkgConfig REQUIRED) pkg_check_modules(GTKMM REQUIRED gtkmm-4.0) pkg_check_modules(WebKit REQUIRED webkitgtk-6.0) find_package(nlohmann_json 3.10.0 REQUIRED) include_directories( ${GTKMM_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ) link_directories(${GTKMM_LIBRARY_DIRS}) include_directories(${WebKit_INCLUDE_DIRS}) add_definitions(${GTKMM_CFLAGS_OTHER}) target_link_libraries(gpanthera ${GTKMM_LIBRARIES}) if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/locales") message(FATAL_ERROR "locales directory not found in source tree") endif() file(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/locales) file(COPY locales DESTINATION ${CMAKE_BINARY_DIR})