| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- cmake_minimum_required(VERSION 3.13)
- project(Sophiar2)
- set(CMAKE_CXX_STANDARD 20)
- add_compile_options(-march=native)
- add_compile_options(-mno-avx) # enable avx will cause some stack pointer alignment error with Eigen
- #add_compile_definitions(CORO_SIGNAL2_USE_TIMER)
- include_directories(./src)
- find_package(Boost REQUIRED COMPONENTS iostreams)
- list(APPEND BASIC_LIBS ${Boost_LIBRARIES})
- include_directories(${Boost_INCLUDE_DIRS})
- find_package(fmt REQUIRED)
- list(APPEND BASIC_LIBS fmt::fmt)
- find_package(spdlog REQUIRED)
- list(APPEND BASIC_LIBS spdlog::spdlog)
- add_compile_definitions(SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE)
- find_package(Eigen3 REQUIRED)
- list(APPEND BASIC_LIBS Eigen3::Eigen)
- find_package(nlohmann_json REQUIRED)
- list(APPEND BASIC_LIBS nlohmann_json::nlohmann_json)
- IF (WIN32)
- list(APPEND BASIC_LIBS ws2_32 wsock32 winmm bcrypt)
- ELSEIF (UNIX)
- list(APPEND BASIC_LIBS crypt)
- ENDIF ()
- include(src/core/CMakeLists.txt)
- include(src/algorithm/CMakeLists.txt)
- include(src/sensor/CMakeLists.txt)
- include(src/robot/CMakeLists.txt)
- add_executable(${PROJECT_NAME} src/main.cpp)
- target_link_libraries(${PROJECT_NAME} ${BASIC_LIBS})
- target_link_libraries(${PROJECT_NAME} ${SOPHIAR_LIBS})
- add_subdirectory(app)
- add_subdirectory(tests)
|