cmake_minimum_required(VERSION 3.21)
project(lanelet2)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
if (MSVC)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
    add_compile_definitions(_USE_MATH_DEFINES)
endif ()

if (SKBUILD)
    set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
    set(CMAKE_INSTALL_RPATH "${CMAKE_SOURCE_DIR}/build/lib")
endif ()

if (NOT BUILD_TESTING STREQUAL OFF)
    enable_testing()
endif ()

add_subdirectory(lanelet2_maps)
add_subdirectory(lanelet2_core)
add_subdirectory(lanelet2_io)
add_subdirectory(lanelet2_projection)
add_subdirectory(lanelet2_traffic_rules)
add_subdirectory(lanelet2_routing)
add_subdirectory(lanelet2_validation)
add_subdirectory(lanelet2_matching)
add_subdirectory(lanelet2_python)