This repository has been archived on 2026-02-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Livox-SDK/CMakeLists.txt
T
2024-01-11 14:36:25 +01:00

38 lines
1.0 KiB
CMake
Executable File

cmake_minimum_required(VERSION 3.0)
project(livox_sdk)
message(STATUS "main project dir: " ${PROJECT_SOURCE_DIR})
# This variable is set by project() in CMake 3.21+
string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}" PROJECT_IS_TOP_LEVEL)
if(PROJECT_IS_TOP_LEVEL)
option(shared_DEVELOPER_MODE "Enable developer mode" OFF)
endif()
set(CMAKE_CXX_STANDARD 11)
if (CMAKE_CROSSCOMPILING)
set(THREADS_PTHREAD_ARG
"PLEASE_FILL_OUT-FAILED_TO_RUN"
CACHE STRING "Result from TRY_RUN" FORCE)
endif()
if (UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
endif(UNIX)
# Always build the core SDK library
add_subdirectory(sdk_core sdk_core)
# Only build the samples if this is the top-level project
if(PROJECT_IS_TOP_LEVEL)
add_subdirectory(sample/hub)
add_subdirectory(sample/lidar)
add_subdirectory(sample/hub_lvx_file)
add_subdirectory(sample/lidar_lvx_file)
add_subdirectory(sample_cc/hub)
add_subdirectory(sample_cc/lidar)
add_subdirectory(sample_cc/trouble_shooting)
add_subdirectory(sample_cc/lidar_utc_sync)
endif()