Skip to content

Commit b7ad9c2

Browse files
committed
feat(+doc): added find_package integration
1 parent 851375a commit b7ad9c2

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

CMakeLists.txt

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,41 @@
1-
cmake_minimum_required(VERSION 3.21)
1+
cmake_minimum_required(VERSION 3.24)
22

33
project(Turing
44
LANGUAGES CXX
55
VERSION 0.2
66
)
77

8-
set(CMAKE_BUILD_TYPE Debug)
8+
set(CMAKE_BUILD_TYPE Release)
99

1010
include(FetchContent)
1111

1212
set(FETCHCONTENT_UPDATES_DISCONNECTED TRUE)
13+
1314
FetchContent_Declare(ftxui
1415
GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
15-
GIT_TAG v3.0.0
16+
GIT_TAG v4.0.0
17+
FIND_PACKAGE_ARGS NAMES ftxui
1618
)
1719

1820
FetchContent_Declare(json
1921
GIT_REPOSITORY https://github.com/nlohmann/json
2022
GIT_TAG v3.10.5
23+
FIND_PACKAGE_ARGS NAMES nlohmann_json
2124
)
2225

23-
FetchContent_GetProperties(json)
24-
if(NOT json_POPULATED)
25-
FetchContent_Populate(json)
26-
add_subdirectory(${json_SOURCE_DIR} ${json_BINARY_DIR} EXCLUDE_FROM_ALL)
27-
endif()
28-
29-
FetchContent_GetProperties(ftxui)
30-
if(NOT ftxui_POPULATED)
31-
FetchContent_Populate(ftxui)
32-
add_subdirectory(${ftxui_SOURCE_DIR} ${ftxui_BINARY_DIR} EXCLUDE_FROM_ALL)
33-
endif()
26+
FetchContent_MakeAvailable(ftxui json)
3427

3528
set(CMAKE_CXX_STANDARD 23)
3629

3730
include_directories(include)
38-
#include_directories(${json_SOURCE_DIR}/include)
3931

4032
add_library(TuringLib src/turing.cpp)
4133
add_library(TuringUI src/turingUI.cpp)
4234
add_library(Translate src/translate.cpp)
4335

4436
target_link_libraries(Translate TuringLib)
45-
#add_library(Utils src/utils.cpp)
4637

4738
target_link_libraries(TuringUI PRIVATE Translate ftxui::screen ftxui::dom ftxui::component TuringLib nlohmann_json::nlohmann_json)
4839

49-
#target_link_libraries(Utils PRIVATE nlohmann_json::nlohmann_json)
50-
5140
add_executable(turing-cmd src/main.cpp)
5241
target_link_libraries(turing-cmd PRIVATE Translate ftxui::screen ftxui::dom ftxui::component TuringLib TuringUI nlohmann_json::nlohmann_json)

README-RU.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949

5050
## Установка
5151

52+
Вы можете использовать скомпилированную версию из [релизов](https://github.com/DanArmor/turing_cmd/releases) (пока только для Linux).
53+
5254
<a name="ubuntu-debian"/>
5355

5456
### Ubuntu/Debian:

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ You can navigate with keyboard arrows or with mouse, exit by Esc. There are hotk
5050

5151
## Installation:
5252

53+
You can use binaries from [releases](https://github.com/DanArmor/turing_cmd/releases) (Linux only for now).
54+
5355
<a name="ubuntu-debian"/>
5456

5557
### Ubuntu/Debian:
@@ -74,6 +76,9 @@ There are two deps, but if you have CMake - you're ready to go: make a "build" d
7476
<a name="changelog"/>
7577

7678
## Changelog:
79+
80+
v0.2.1 - FTXUI V4.0.0
81+
7782
v0.2 - moved to nlohmann/json, replaced wchar/wstring with char/string, changed save/load notification, moved to FTXUI V3.0.0
7883

7984
v0.1 - init version

0 commit comments

Comments
 (0)