-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
64 lines (56 loc) · 2.06 KB
/
CMakeLists.txt
File metadata and controls
64 lines (56 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
cmake_minimum_required(VERSION 3.10)
project(Aurora LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Support for vcpkg
if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
message(STATUS "Using vcpkg toolchain: ${CMAKE_TOOLCHAIN_FILE}")
endif()
message(STATUS "")
message(STATUS "========== Aurora Player Build ==========")
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
message(STATUS "=========================================")
message(STATUS "")
# Try to find installed lmcore first, fallback to local source if not found
find_package(lmcore QUIET)
if(lmcore_FOUND)
message(STATUS "Using system-installed lmcore library")
set(LMCORE_SOURCE "system")
else()
# Check if local lmcore directory exists
set(LMCORE_LOCAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../lmcore")
if(EXISTS "${LMCORE_LOCAL_DIR}/CMakeLists.txt")
if(NOT TARGET lmcore)
add_subdirectory(../lmcore lmcore_build)
endif()
message(STATUS "Using local lmcore from sibling directory")
set(LMCORE_SOURCE "local")
else()
# Neither system nor local lmcore found - show helpful error
message(FATAL_ERROR
"Cannot find lmcore dependency!\n"
"\n"
"Searched locations:\n"
" 1. System installation (using find_package lmcore)\n"
" 2. Local directory: ${LMCORE_LOCAL_DIR}\n"
"\n"
"Solution - Download lmcore to sibling directory:\n"
"\n"
" cd ${CMAKE_CURRENT_SOURCE_DIR}/..\n"
" git clone https://github.com/lmshao/lmcore.git\n"
"\n"
"Repository: https://github.com/lmshao/lmcore\n"
"\n"
"After downloading, re-run: cmake .."
)
endif()
endif()
# Enable testing
enable_testing()
# Build lmplayer SDK
add_subdirectory(lmplayer)
# Build tools
add_subdirectory(tools/media_dump)
add_subdirectory(app)