You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ubl-settings-manager/source/CMakeLists.txt

49 lines
1.9 KiB

cmake_minimum_required(VERSION 3.7)
project(ubl-settings-manager)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK REQUIRED gtk+-3.0)
include_directories(${GTK_INCLUDE_DIRS})
link_directories(${GTK_LIBRARY_DIRS})
add_definitions(${GTK_CFLAGS_OTHER})
option(WEBKIT_FOUND "No" OFF)
find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
message("${WEBKIT_LIBRARIES_FOUND}")
if(WEBKIT_LIBRARIES_FOUND)
option(WEBKIT_FOUND "Yes" ON)
message("Webkit is located at ${WEBKIT_LIBRARIES_FOUND}")
PKG_CHECK_MODULES(WEBKIT REQUIRED webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
include_directories(${WEBKIT_INCLUDE_DIRS})
link_directories(${WEBKIT_LIBRARY_DIRS})
add_definitions(${WEBKIT_CFLAGS_OTHER})
endif()
configure_file(ubl-settings-manager.h.in ubl-settings-manager-cm.h)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -std=c++2a")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -lm")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \
-O2 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection")
set(SOURCE_FILES
ubl-settings-manager.c
ubl-settings-manager.h
ubl-settings-manager-cm.h)
set(LIBRARIES
${GTK_LIBRARIES}
pthread)
add_executable(ubl-settings-manager ${SOURCE_FILES})
target_link_libraries(ubl-settings-manager PUBLIC ${WEBKIT_LIBRARIES} ${LIBRARIES})
target_include_directories(ubl-settings-manager PUBLIC
"${PROJECT_BINARY_DIR}"
${WEBKIT_INCLUDE_DIRS}
)
install(TARGETS ubl-settings-manager DESTINATION bin)