# Build system for the libprof library for gint cmake_minimum_required(VERSION 3.16) project(libprof VERSION 2.4.0 LANGUAGES C) find_package(Gint 2.2.1 REQUIRED) configure_file(libprof.h libprof.h) set(NAME "prof-${FXSDK_PLATFORM}") add_library(${NAME} STATIC libprof.c) 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) 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}")