This repository was archived by the owner on Jul 19, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
48 lines (40 loc) · 1.42 KB
/
CMakeLists.txt
File metadata and controls
48 lines (40 loc) · 1.42 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
cmake_minimum_required(VERSION 3.30)
project(wang_chongxi_2024_25310619)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 17)
if(APPLE)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm64")
set(HOMEBREW_PREFIX "/opt/homebrew")
else()
set(HOMEBREW_PREFIX "/usr/local")
endif()
endif()
include_directories(${HOMEBREW_PREFIX}/include)
include_directories(${CMAKE_SOURCE_DIR}/includes)
include_directories(${CMAKE_SOURCE_DIR}/users)
include_directories(${CMAKE_SOURCE_DIR}/books)
include_directories(${CMAKE_SOURCE_DIR}/records)
include_directories(/usr/local/opt/openssl@3/include)
find_library(FTXUI_SCREEN_LIB NAMES ftxui-screen HINTS ${HOMEBREW_PREFIX}/lib)
find_library(FTXUI_DOM_LIB NAMES ftxui-dom HINTS ${HOMEBREW_PREFIX}/lib)
find_library(FTXUI_COMPONENT_LIB NAMES ftxui-component HINTS ${HOMEBREW_PREFIX}/lib)
if(NOT FTXUI_SCREEN_LIB OR NOT FTXUI_DOM_LIB OR NOT FTXUI_COMPONENT_LIB)
message(FATAL_ERROR "FTXUI libraries not found. Please ensure FTXUI is installed via Homebrew.")
endif()
add_executable(wang_chongxi_2024_25310619
Main.cpp
users/User.cpp
users/User.h
books/book.cpp
books/book.h
pages/Pages.cpp
pages/Pages.h
records/record.cpp
records/record.h
)
target_link_libraries(wang_chongxi_2024_25310619
/usr/local/opt/openssl@3/lib/libcrypto.dylib
${FTXUI_SCREEN_LIB}
${FTXUI_DOM_LIB}
${FTXUI_COMPONENT_LIB}
)