gctl_optimization/CMakeLists.txt
2024-10-25 11:23:42 +08:00

27 lines
853 B
CMake
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

cmake_minimum_required(VERSION 3.15.2)
# 设置项目名称与语言
project(GCTL_OPTIMIZATION VERSION 1.0)
# 添加配置配件编写的函数
include(CMakePackageConfigHelpers)
message(STATUS "Platform: " ${CMAKE_HOST_SYSTEM_NAME})
message(STATUS "Install prefix: " ${CMAKE_INSTALL_PREFIX})
message(STATUS "Processor: " ${CMAKE_HOST_SYSTEM_PROCESSOR})
option(GCTL_OPTIMIZATION_TOML "Use the TOML library" ON)
message(STATUS "[GCTL_OPTIMIZATION] Use the TOML library: " ${GCTL_OPTIMIZATION_TOML})
find_package(GCTL REQUIRED)
include_directories(${GCTL_INC_DIR})
# 加入一个头文件配置让cmake对源码进行操作
configure_file(
"${PROJECT_SOURCE_DIR}/config.h.in"
"${PROJECT_SOURCE_DIR}/lib/optimization/gctl_optimization_config.h"
)
# 添加库源文件地址
add_subdirectory(lib)
add_subdirectory(example)
add_subdirectory(tool)