1 Star 0 Fork 92

boework / mult_timer

forked from 极简美 / mult_timer 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
CMakeLists.txt 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
极简美 提交于 2023-08-28 07:13 . 导入最新cmake最新框架
cmake_minimum_required(VERSION 3.24)
#Component name, default the same as directory name
get_filename_component(component_dir ${CMAKE_PARENT_LIST_FILE} DIRECTORY)
get_filename_component(component_name ${component_dir} NAME)
project(${component_name})
unset(COMPONENT_NAME)
set(COMPONENT_NAME simpost_timer)
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/output/${CMAKE_BUILD_TYPE}")
include(${CMAKE_BINARY_DIR}/conan/conanbuildinfo.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/commit.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/option.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cpack.cmake)
conan_basic_setup()
if(NOT DEFINED BUILD_STATIC_LIBS)
set(BUILD_STATIC_LIBS ON)
endif()
if(NOT DEFINED BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS ON)
endif()
if(NOT DEFINED BUILD_EXAMPLES)
set(BUILD_EXAMPLES ON)
endif()
if(NOT DEFINED BUILD_TESTS)
set(BUILD_TESTS ON)
endif()
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build, options are: Debug | Release." FORCE)
endif()
add_subdirectory(source)
if(${BUILD_EXAMPLES} STREQUAL "ON")
add_subdirectory(example)
endif()
if(${BUILD_TESTS} STREQUAL "ON")
add_subdirectory(unittest)
endif()
######################################################################
# uninstall targget
if(NOT TARGET uninstall)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()
C
1
https://gitee.com/boework/mult_timer.git
git@gitee.com:boework/mult_timer.git
boework
mult_timer
mult_timer
master

搜索帮助