libprof/CMakeLists.txt

22 lines
711 B
Text
Raw Normal View History

2021-01-27 14:35:54 +01:00
# Build system for the libprof library for gint
2021-02-01 22:28:11 +01:00
cmake_minimum_required(VERSION 3.16)
2021-04-27 15:47:41 +02:00
project(libprof VERSION 2.4.0 LANGUAGES C)
2021-01-27 14:35:54 +01:00
find_package(Gint 2.2.1 REQUIRED)
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}
DESTINATION "${FXSDK_COMPILER_INSTALL}")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libprof.h"
DESTINATION "${FXSDK_COMPILER_INSTALL}/include")
install(FILES cmake/FindLibProf.cmake
DESTINATION "${FXSDK_CMAKE_MODULE_PATH}")