第一次提交
This commit is contained in:
28
CMakeLists.txt
Normal file
28
CMakeLists.txt
Normal file
@ -0,0 +1,28 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(SpectralFormat)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
|
||||
# Include nlohmann/json
|
||||
include_directories(source)
|
||||
include_directories(source/iris_format)
|
||||
include_directories(source/json)
|
||||
# Add the main library
|
||||
add_library(IrisFormat SHARED
|
||||
source/iris_format/iris_deffine.cpp
|
||||
source/iris_format/forwin.cpp
|
||||
)
|
||||
|
||||
# Add the test executable
|
||||
add_executable(test_iris_format tests/test_iris_format.cpp)
|
||||
|
||||
# Link the library and json header to the test executable
|
||||
target_link_libraries(test_iris_format IrisFormat)
|
||||
|
||||
# Add a test case
|
||||
add_test(NAME IrisReadWriteTest COMMAND test_iris_format)
|
||||
|
||||
# Optional: Install the library
|
||||
# install(TARGETS IrisFormat DESTINATION lib)
|
||||
# install(FILES source/IrisFormat.hpp DESTINATION include)
|
Reference in New Issue
Block a user