MacOS build instruction rewrite to build third party libs from source
This commit is contained in:
parent
4cc07f9112
commit
0f19a691c2
17
Makefile
17
Makefile
@ -48,7 +48,8 @@ else
|
||||
endif
|
||||
|
||||
# Common include and library paths
|
||||
INCLUDE_PATHS = -I$(DPP_PATH)/include -I../sqlite3
|
||||
#INCLUDE_PATHS = -I$(DPP_PATH)/include -I../sqlite3
|
||||
INCLUDE_PATHS = -I$(DPP_PATH)/include
|
||||
DPP_BUILD_DIR = $(DPP_PATH)/build/library
|
||||
|
||||
# Platform-specific versioned library filename
|
||||
@ -59,8 +60,9 @@ else
|
||||
endif
|
||||
|
||||
# Library flags
|
||||
LIB_PATHS = -L$(DPP_BUILD_DIR) -L../sqlite3
|
||||
LIBRARIES = -ldpp -lsqlite3
|
||||
#LIB_PATHS = -L$(DPP_BUILD_DIR) -L../sqlite3
|
||||
LIB_PATHS = -L$(DPP_BUILD_DIR) -L.
|
||||
LIBRARIES = -ldpp -lsqlite3 -lssl -lcrypto
|
||||
|
||||
# Build type specific flags
|
||||
ifeq ($(BUILD_TYPE), debug)
|
||||
@ -96,6 +98,14 @@ ifeq ($(PLATFORM), Darwin)
|
||||
else \
|
||||
cp $(DPP_BUILD_DIR)/$(DPP_LIB_NAME) $(BIN_DIR)/$(DPP_LIB_NAME); \
|
||||
fi
|
||||
@# Fix library paths for OpenSSL dependencies
|
||||
@if [ -f $(BIN_DIR)/$(DPP_VERSIONED_FILE) ]; then \
|
||||
install_name_tool -change /Users/harvey/learndir/libssl/install/lib/libssl.4.dylib @executable_path/libssl.dylib $(BIN_DIR)/$(DPP_VERSIONED_FILE); \
|
||||
install_name_tool -change /Users/harvey/learndir/libssl/install/lib/libcrypto.4.dylib @executable_path/libcrypto.dylib $(BIN_DIR)/$(DPP_VERSIONED_FILE); \
|
||||
fi
|
||||
@install_name_tool -change /Users/harvey/learndir/libssl/install/lib/libssl.4.dylib @executable_path/libssl.dylib $(OUTPUT_FILE); \
|
||||
install_name_tool -change /Users/harvey/learndir/libssl/install/lib/libcrypto.4.dylib @executable_path/libcrypto.dylib $(OUTPUT_FILE); \
|
||||
cp libssl.dylib libcrypto.dylib $(BIN_DIR)/
|
||||
else
|
||||
@# Linux: Handle versioned libraries (follow standard convention)
|
||||
@if [ -f $(DPP_BUILD_DIR)/$(DPP_VERSIONED_FILE) ]; then \
|
||||
@ -150,3 +160,4 @@ cleanall:
|
||||
rmdir bin/* 2>/dev/null || true
|
||||
rmdir obj 2>/dev/null || true
|
||||
rmdir bin 2>/dev/null || true
|
||||
|
||||
|
||||
16
README.md
16
README.md
@ -56,15 +56,13 @@ brew install openssl
|
||||
git clone https://github.com/brainboxdotcc/DPP.git
|
||||
cd DPP
|
||||
/Applications/CMake.app/Contents/bin/cmake -B ./build \
|
||||
-DOPENSSL_ROOT_DIR=../homebrew/opt/openssl@3 \
|
||||
-DOPENSSL_INCLUDE_DIR=../homebrew/opt/openssl@3/include \
|
||||
-DOPENSSL_CRYPTO_LIBRARY=../homebrew/opt/openssl@3/lib/libcrypto.a \
|
||||
-DOPENSSL_SSL_LIBRARY=../homebrew/opt/openssl@3/lib/libssl.a
|
||||
|
||||
/Applications/CMake.app/Contents/bin/cmake --build ./build -j8
|
||||
cd ..
|
||||
git clone https://git.indoodle.com/oomer/poomer-discord.git
|
||||
cd poomer-discord
|
||||
-DOPENSSL_INCLUDE_DIR="$PWD/../libssl/include" \
|
||||
-DOPENSSL_CRYPTO_LIBRARY="$PWD/../libssl/lib/libcrypto.dylib" \
|
||||
-DOPENSSL_SSL_LIBRARY="$PWD/../libssl/lib/libssl.dylib" \
|
||||
-DCMAKE_PREFIX_PATH="$PWD/../zlib"
|
||||
/Applications/CMake.app/Contents/bin/cmake --build ./build -j8
|
||||
cd ../poomer-discord
|
||||
git clone https://git.indoodle.com/oomer/poomer-discord.git .
|
||||
curl -LO https://raw.githubusercontent.com/nothings/stb/master/stb_image.h
|
||||
curl -LO https://raw.githubusercontent.com/nothings/stb/master/stb_image_write.h
|
||||
make all -j4
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user