libprof/CMakeLists.txt

22 lines
681 B
Text
Raw Permalink Normal View History

2021-01-27 14:35:54 +01:00
# Build system for the libprof library for gint
cmake_minimum_required(VERSION 3.15)
2021-04-27 15:47:41 +02:00
project(libprof VERSION 2.4.0 LANGUAGES C)
find_package(Gint 2.4.0 REQUIRED)
2021-01-27 14:35:54 +01:00
configure_file(libprof.h libprof.h)
2021-01-27 14:35:54 +01:00
set(NAME "prof-${FXSDK_PLATFORM}")
add_library(${NAME} STATIC libprof.c)
2021-01-27 14:35:54 +01:00
target_compile_options(${NAME} PUBLIC -Wall -Wextra -std=c11 -Os)
target_include_directories(${NAME} PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
target_link_libraries(${NAME} Gint::Gint)
2021-01-27 14:35:54 +01:00
install(TARGETS ${NAME}
2022-08-19 16:38:35 +02:00
DESTINATION "${FXSDK_LIB}")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libprof.h"
2022-08-19 16:38:35 +02:00
DESTINATION "${FXSDK_INCLUDE}")
install(FILES cmake/FindLibProf.cmake
DESTINATION "${FXSDK_CMAKE_MODULE_PATH}")