Files
iris_format/CMakeLists.txt
2025-06-12 09:35:09 +08:00

28 lines
793 B
CMake

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)