Skip to content

Commit

Permalink
Merge pull request #933 from openmultiplayer/amir/no-conan-sdk
Browse files Browse the repository at this point in the history
Fix raknet, Remove conan from SDK, Disable unicode component by default
  • Loading branch information
AmyrAhmady authored Jul 12, 2024
2 parents 568a108 + b6a2aef commit 8118b0d
Show file tree
Hide file tree
Showing 16 changed files with 56 additions and 38 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,9 @@ conanbuildinfo*.*
conanfile.txt
conaninfo.txt
graph_info.json
cmake_install.cmake
*-config-version.cmake
*-config.cmake
*-targets.cmake
CTestTestfile.cmake
*Config.cmake
18 changes: 15 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,21 @@
[submodule "lib/ttmath"]
path = lib/ttmath
url = https://github.com/openmultiplayer/ttmath.git
[submodule "SDK/lib/cmake-conan"]
path = SDK/lib/cmake-conan
url = https://github.com/openmultiplayer/cmake-conan.git
[submodule "lib/cpp-httplib"]
path = lib/cpp-httplib
url = https://github.com/openmultiplayer/cpp-httplib.git
[submodule "lib/cmake-conan"]
path = lib/cmake-conan
url = https://github.com/openmultiplayer/cmake-conan.git
[submodule "SDK/lib/glm"]
path = SDK/lib/glm
url = https://github.com/g-truc/glm
[submodule "SDK/lib/robin-hood-hashing"]
path = SDK/lib/robin-hood-hashing
url = https://github.com/martinus/robin-hood-hashing
[submodule "SDK/lib/span-lite"]
path = SDK/lib/span-lite
url = https://github.com/martinmoene/span-lite
[submodule "SDK/lib/string-view-lite"]
path = SDK/lib/string-view-lite
url = https://github.com/martinmoene/string-view-lite
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.19)
project(open-mp LANGUAGES C CXX VERSION 1.2.0)
project(open-mp LANGUAGES C CXX VERSION 1.3.1)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)

Expand Down Expand Up @@ -130,7 +130,7 @@ endfunction()

set(BUILD_SERVER TRUE CACHE BOOL "Whether to build the open.mp server")
set(BUILD_PAWN_COMPONENT TRUE CACHE BOOL "Whether to build the PAWN component")
set(BUILD_UNICODE_COMPONENT TRUE CACHE BOOL "Whether to build the Unicode component")
set(BUILD_UNICODE_COMPONENT FALSE CACHE BOOL "Whether to build the Unicode component")
set(BUILD_LEGACY_COMPONENTS TRUE CACHE BOOL "Whether to build the legacy components")
set(BUILD_TEST_COMPONENTS FALSE CACHE BOOL "Whether to build the test component")
set(BUILD_SQLITE_COMPONENT TRUE CACHE BOOL "Whether to build the SQLite component")
Expand Down
20 changes: 8 additions & 12 deletions SDK/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
cmake_minimum_required(VERSION 3.19)
project(OMP-SDK LANGUAGES CXX DESCRIPTION "Stable classes to write open.mp components with" VERSION 1)

# Conan third-party libraries
include(lib/cmake-conan/conan.cmake)
include(lib/cmake-conan/conan-omp.cmake)

conan_omp_add_lib(glm 0.9.9.8)
conan_omp_add_lib(robin-hood-hashing 3.11.5)
conan_omp_add_lib(span-lite 0.10.3)
conan_omp_add_lib(string-view-lite 1.6.0)
add_subdirectory(lib/glm)
add_subdirectory(lib/robin-hood-hashing)
add_subdirectory(lib/span-lite)
add_subdirectory(lib/string-view-lite)

add_library(OMP-SDK INTERFACE)

Expand Down Expand Up @@ -46,10 +42,10 @@ if (NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
endif()

target_link_libraries(OMP-SDK INTERFACE
CONAN_PKG::glm
CONAN_PKG::robin-hood-hashing
CONAN_PKG::span-lite
CONAN_PKG::string-view-lite
glm::glm
robin_hood
span-lite
string-view-lite
)

target_compile_definitions(OMP-SDK INTERFACE
Expand Down
1 change: 0 additions & 1 deletion SDK/lib/cmake-conan
Submodule cmake-conan deleted from 39f353
1 change: 1 addition & 0 deletions SDK/lib/glm
Submodule glm added at bf71a8
1 change: 1 addition & 0 deletions SDK/lib/robin-hood-hashing
Submodule robin-hood-hashing added at 9145f9
1 change: 1 addition & 0 deletions SDK/lib/span-lite
Submodule span-lite added at cbb9c3
1 change: 1 addition & 0 deletions SDK/lib/string-view-lite
Submodule string-view-lite added at a47222
10 changes: 5 additions & 5 deletions docker/abicheck_ubuntu-18.04/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

set -e

cmake \
-S . \
-B build \
cd build \
&&
cmake .. \
-G Ninja \
-DCMAKE_C_FLAGS=-m32 \
-DCMAKE_CXX_FLAGS=-m32 \
Expand All @@ -20,11 +20,11 @@ cmake \
-DBUILD_ABI_CHECK_TOOL=$build_tools \
&&
cmake \
--build build \
--build . \
--config $config \
--parallel $(nproc)

cd build/Output/*/Tools
cd Output/*/Tools
echo "Fetching ref artifacts"
url=$(curl "https://nightly.link/$NIGHTLY_REPO/workflows/build/master" | grep -oP "(?<=\")https://nightly.link/$NIGHTLY_REPO/workflows/build/master/open.mp-linux-x86-dynssl.*\.zip(?=\")")
curl -L $url -o master.zip
Expand Down
8 changes: 4 additions & 4 deletions docker/build_ubuntu-18.04/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
[ -z $BUILD_TOOLS ] && build_tools=0 || build_tools="$BUILD_TOOLS"
[ -z $TARGET_BUILD_ARCH ] && target_build_arch=x86 || target_build_arch="$TARGET_BUILD_ARCH"

cmake \
-S . \
-B build \
cd build \
&&
cmake .. \
-G Ninja \
-DTARGET_BUILD_ARCH=$target_build_arch \
-DCMAKE_BUILD_TYPE=$config \
Expand All @@ -17,6 +17,6 @@ cmake \
-DBUILD_ABI_CHECK_TOOL=$build_tools \
&&
cmake \
--build build \
--build . \
--config $config \
--parallel $(nproc)
8 changes: 4 additions & 4 deletions docker/build_ubuntu-20.04/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
[ -z $CONFIG ] && config=Release || config="$CONFIG"
[ -z $TARGET_BUILD_ARCH ] && target_build_arch=x86 || target_build_arch="$TARGET_BUILD_ARCH"

cmake \
-S . \
-B build \
cd build \
&&
cmake .. \
-G Ninja \
-DTARGET_BUILD_ARCH=$target_build_arch \
-DCMAKE_BUILD_TYPE=$config \
&&
cmake \
--build build \
--build . \
--config $config \
--parallel $(nproc)
8 changes: 4 additions & 4 deletions docker/build_ubuntu-22.04/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
[ -z $CONFIG ] && config=Release || config="$CONFIG"
[ -z $TARGET_BUILD_ARCH ] && target_build_arch=x86 || target_build_arch="$TARGET_BUILD_ARCH"

cmake \
-S . \
-B build \
cd build \
&&
cmake .. \
-G Ninja \
-DTARGET_BUILD_ARCH=$target_build_arch \
-DCMAKE_BUILD_TYPE=$config \
&&
cmake \
--build build \
--build . \
--config $config \
--parallel $(nproc)
4 changes: 2 additions & 2 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Conan third-party libraries
include(${CMAKE_SOURCE_DIR}/SDK/lib/cmake-conan/conan.cmake)
include(${CMAKE_SOURCE_DIR}/SDK/lib/cmake-conan/conan-omp.cmake)
include(${CMAKE_SOURCE_DIR}/lib/cmake-conan/conan.cmake)
include(${CMAKE_SOURCE_DIR}/lib/cmake-conan/conan-omp.cmake)

if(BUILD_SERVER)
if(BUILD_PAWN_COMPONENT)
Expand Down
2 changes: 1 addition & 1 deletion lib/RakNet
1 change: 1 addition & 0 deletions lib/cmake-conan
Submodule cmake-conan added at 79dfe1

0 comments on commit 8118b0d

Please sign in to comment.