update build system and netcdf.cpp

This commit is contained in:
张壹
2021-08-01 14:37:01 +08:00
parent 7428b5a6f0
commit 0c6e4bdad7
5 changed files with 53 additions and 16 deletions

View File

@@ -4,7 +4,12 @@ cmake_minimum_required(VERSION 3.15.2)
project(NETCDF_CXX)
message(STATUS "Platform: " ${CMAKE_HOST_SYSTEM_NAME})
set(CMAKE_INSTALL_PREFIX "D:/Library")
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
#set(CMAKE_C_COMPILER gcc)
#set(CMAKE_CXX_COMPILER g++)
set(CMAKE_INSTALL_PREFIX D:/Library)
endif()
message(STATUS "Install prefix: " ${CMAKE_INSTALL_PREFIX})
# 添加源文件地址
add_subdirectory(src/)