Skip to content

Commit 9d2b02d

Browse files
committed
refactor: rename cortex-cpp to engine
1 parent 952c0eb commit 9d2b02d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+63
-4
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ cortex-js/package-lock.json
1818
.vscode
1919
cortex-js/command
2020
cortex-js/src/infrastructure/commanders/test/test_data
21+
**/vcpkg_installed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "engine/vcpkg"]
2+
path = engine/vcpkg
3+
url = https://github.com/microsoft/vcpkg.git
File renamed without changes.
File renamed without changes.

cortex-cpp/CMakeLists.txt engine/CMakeLists.txt

+26-4
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,17 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
3333
set(CMAKE_CXX_EXTENSIONS OFF)
3434
set(OPENSSL_USE_STATIC_LIBS TRUE)
3535
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
36-
set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/build-deps/_install)
36+
# set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/build-deps/_install)
3737
# This is the critical line for installing another package
3838

39+
if(MSVC)
40+
add_compile_options(
41+
$<$<CONFIG:>:/MT> #---------|
42+
$<$<CONFIG:Debug>:/MTd> #---|-- Statically link the runtime libraries
43+
$<$<CONFIG:Release>:/MT> #--|
44+
)
45+
endif()
46+
3947
if(LLAMA_CUDA)
4048
cmake_minimum_required(VERSION 3.17)
4149

@@ -75,6 +83,16 @@ add_compile_definitions(CORTEX_CPP_VERSION="${CORTEX_CPP_VERSION}")
7583

7684
# add_subdirectory(test)
7785

86+
find_package(jsoncpp CONFIG REQUIRED)
87+
find_package(Drogon CONFIG REQUIRED)
88+
find_package(yaml-cpp CONFIG REQUIRED)
89+
find_package(jinja2cpp CONFIG REQUIRED)
90+
find_package(httplib CONFIG REQUIRED)
91+
find_package(nlohmann_json CONFIG REQUIRED)
92+
find_package(CLI11 CONFIG REQUIRED)
93+
find_package(unofficial-minizip CONFIG REQUIRED)
94+
find_package(LibArchive REQUIRED)
95+
7896
# Build using CMAKE-JS
7997
if(DEFINED CMAKE_JS_INC)
8098
if(("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") OR("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"))
@@ -109,8 +127,12 @@ endif()
109127
#
110128
# and comment out the following lines
111129

112-
find_package(Drogon CONFIG REQUIRED)
113-
130+
target_link_libraries(${PROJECT_NAME} PRIVATE httplib::httplib)
131+
target_link_libraries(${PROJECT_NAME} PRIVATE nlohmann_json::nlohmann_json)
132+
target_link_libraries(${PROJECT_NAME} PRIVATE jinja2cpp)
133+
target_link_libraries(${PROJECT_NAME} PRIVATE CLI11::CLI11)
134+
target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::minizip::minizip)
135+
target_link_libraries(${PROJECT_NAME} PRIVATE LibArchive::LibArchive)
114136

115137
# Build using CMAKE-JS
116138
if(DEFINED CMAKE_JS_INC)
@@ -124,7 +146,7 @@ if(DEFINED CMAKE_JS_INC)
124146
execute_process(COMMAND ${CMAKE_AR} /def:${CMAKE_JS_NODELIB_DEF} /out:${CMAKE_JS_NODELIB_TARGET} ${CMAKE_STATIC_LINKER_FLAGS})
125147
endif()
126148
else()
127-
target_link_libraries(${PROJECT_NAME} PRIVATE Drogon::Drogon
149+
target_link_libraries(${PROJECT_NAME} PRIVATE JsonCpp::JsonCpp Drogon::Drogon OpenSSL::SSL OpenSSL::Crypto yaml-cpp::yaml-cpp
128150
${CMAKE_THREAD_LIBS_INIT})
129151
endif()
130152
# ##############################################################################

cortex-cpp/LICENSE engine/LICENSE

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

cortex-cpp/main.cc engine/main.cc

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

engine/vcpkg

Submodule vcpkg added at fb54487

engine/vcpkg-configuration.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"default-registry": {
3+
"kind": "git",
4+
"baseline": "a76e5d9e1c62a23b9e92353e5e25d8c34cda2b74",
5+
"repository": "https://github.com/Cheaterdev/vcpkg"
6+
},
7+
"registries": [
8+
{
9+
"kind": "artifact",
10+
"location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip",
11+
"name": "microsoft"
12+
}
13+
]
14+
}

engine/vcpkg.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"dependencies": [
3+
"cli11",
4+
{
5+
"name": "cpp-httplib",
6+
"features": [
7+
"openssl"
8+
]
9+
},
10+
"drogon",
11+
"jinja2cpp",
12+
"jsoncpp",
13+
"minizip",
14+
"nlohmann-json",
15+
"yaml-cpp",
16+
"libarchive"
17+
]
18+
}

0 commit comments

Comments
 (0)