-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
34 lines (28 loc) 路 1.13 KB
/
Copy pathCMakeLists.txt
File metadata and controls
34 lines (28 loc) 路 1.13 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
cmake_minimum_required(VERSION 3.25)
project(ConchCrossPlatform LANGUAGES CXX C)
# --- Global Settings ---
# Enable C++23 support (widely supported: AppleClang 15+, GCC 11+, MSVC 19.30+)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Standardize output directories (bin/ and lib/)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# --- Conan Integration ---
# Conan-generated files are typically in the build/ directory
find_package(spdlog REQUIRED)
find_package(libuv REQUIRED)
find_package(fmt REQUIRED)
find_package(benchmark REQUIRED)
find_package(GTest REQUIRED)
# Qt is only required for desktop apps, not mobile
if(NOT (CMAKE_SYSTEM_NAME STREQUAL "iOS" OR CMAKE_SYSTEM_NAME STREQUAL "Android"))
find_package(Qt6 COMPONENTS Core Gui Widgets Network REQUIRED)
endif()
# --- Add Subdirectories ---
add_subdirectory(src/libs)
add_subdirectory(src/servers)
add_subdirectory(src/apps)
add_subdirectory(tests)
# add_subdirectory(tools) # Optional, can be enabled later