update cmakelists

This commit is contained in:
2021-09-10 13:09:39 +08:00
parent ebd0f89493
commit b9c140e5ef
4 changed files with 69 additions and 15 deletions

View File

@@ -1,15 +1,14 @@
cmake_minimum_required(VERSION 3.15.2)
# 设置工程名称和语言
project(WAVELIB)
project(WaveLib VERSION 1.0)
# 添加配置配件编写的函数
include(CMakePackageConfigHelpers)
message(STATUS "Platform: " ${CMAKE_HOST_SYSTEM_NAME})
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
#set(CMAKE_C_COMPILER gcc)
#set(CMAKE_CXX_COMPILER g++)
set(CMAKE_INSTALL_PREFIX D:/Library)
endif()
# CMake默认的安装路径 Windows下为C:/Program\ Files/${Project_Name} Linux/Unix下为/usr/local
message(STATUS "Install prefix: " ${CMAKE_INSTALL_PREFIX})
# CMake默认的变异类型为空
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
# 添加源文件地址
add_subdirectory(src)