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-01-27 14:35:54 +01:00
|
|
|
project(libprof VERSION 2.2.1 LANGUAGES C)
|
|
|
|
find_package(Gint 2.2.1 REQUIRED)
|
|
|
|
|
2021-01-28 22:23:33 +01:00
|
|
|
configure_file(libprof.h libprof.h)
|
2021-01-27 14:35:54 +01:00
|
|
|
|
|
|
|
set(NAME "prof-${FXSDK_PLATFORM}")
|
2021-01-28 22:23:33 +01:00
|
|
|
add_library(${NAME} STATIC libprof.c)
|
2021-01-27 14:35:54 +01:00
|
|
|
|
2021-01-28 22:23:33 +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
|
|
|
|
2021-01-28 22:23:33 +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}")
|