add cmakelists

This commit is contained in:
2021-01-10 14:23:03 +08:00
parent 758824ca22
commit ad5ad5cee3
7 changed files with 36 additions and 17 deletions

13
CMakeLists.txt Normal file
View File

@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.15.2 FATAL_ERROR)
project(GMT_API_EX VERSION 0.1.0 LANGUAGES CXX)
include_directories("/usr/local/include/gmt")
find_library(${GMT_LIB} gmt "/usr/local/lib")
macro(add_example name file)
add_executable(${name} ${file}.cpp)
target_link_libraries(${name} PUBLIC ${GMT_LIB})
endmacro()
add_example(ex1 example1/gridding)