CMakeLists.txt
ASCII text
1cmake_minimum_required(VERSION 3.30) 2project(gpanthera) 3 4set(CMAKE_CXX_STANDARD 20) 5set(CMAKE_POSITION_INDEPENDENT_CODE ON) 6set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--export-dynamic") 7set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og") 8 9add_library(gpanthera SHARED gpanthera.cc) 10add_library(test_plugin SHARED test_plugin.cc) 11 12add_executable(panthera-www panthera-www.cc) 13target_link_libraries(panthera-www gpanthera) 14target_link_libraries(panthera-www webkitgtk-6.0) 15target_link_libraries(panthera-www nlohmann_json::nlohmann_json) 16target_link_libraries(panthera-www sqlite3) 17 18find_package(PkgConfig REQUIRED) 19pkg_check_modules(GTKMM REQUIRED gtkmm-4.0) 20pkg_check_modules(WebKit REQUIRED webkitgtk-6.0) 21find_package(nlohmann_json 3.10.0 REQUIRED) 22 23include_directories( 24${GTKMM_INCLUDE_DIRS} 25${CMAKE_CURRENT_SOURCE_DIR} 26) 27link_directories(${GTKMM_LIBRARY_DIRS}) 28include_directories(${WebKit_INCLUDE_DIRS}) 29 30add_definitions(${GTKMM_CFLAGS_OTHER}) 31target_link_libraries(gpanthera ${GTKMM_LIBRARIES}) 32 33if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/locales") 34message(FATAL_ERROR "locales directory not found in source tree") 35endif() 36 37file(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/locales) 38file(COPY locales DESTINATION ${CMAKE_BINARY_DIR}) 39