mirror of
https://github.com/clangen/musikcube.git
synced 2024-12-27 03:14:30 +00:00
More build script cleans.
This commit is contained in:
parent
a8383b3469
commit
767f44d168
@ -7,15 +7,21 @@ add_custom_command(TARGET postbuild POST_BUILD COMMAND cmake .)
|
||||
# strip binaries in release mode
|
||||
if (CMAKE_BUILD_TYPE MATCHES Release)
|
||||
if ((NOT DEFINED DISABLE_STRIP) OR (NOT ${DISABLE_STRIP} MATCHES "true"))
|
||||
message(STATUS "[build] binary stripping enabled for ${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
message(STATUS "[post-build] binary stripping enabled for ${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
add_custom_command(TARGET postbuild POST_BUILD COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/script/strip-nix.sh" ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
else()
|
||||
message(STATUS "[build] DISABLE_STRIP=true, *NOT* stripping binaries.")
|
||||
message(STATUS "[post-build] DISABLE_STRIP=true, *NOT* stripping binaries.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# ensure the binaries can find libmusikcore.so, which lives in the same directory.
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
message(STATUS "[post-build] patching macOS rpath...")
|
||||
add_custom_command(TARGET postbuild POST_BUILD COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/script/patch-macos-rpath.sh")
|
||||
endif()
|
||||
|
||||
# copy boost and ffmpeg libraries (which can't be statically linked) to bin/
|
||||
if (${LINK_STATICALLY} MATCHES "true")
|
||||
message(STATUS "[post-build] copying boost and ffmpeg libs...")
|
||||
add_custom_command(TARGET postbuild POST_BUILD COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/script/stage-static-vendor-libraries.sh")
|
||||
endif()
|
||||
|
@ -233,14 +233,3 @@ make install
|
||||
mv output ../zlib-bin
|
||||
cd ..
|
||||
|
||||
#
|
||||
# stage
|
||||
#
|
||||
|
||||
mkdir -p bin/plugins/
|
||||
cp vendor/boost-bin/lib/libboost_filesystem.so.1.78.0 ./bin/
|
||||
cp vendor/boost-bin/lib/libboost_thread.so.1.78.0 ./bin/
|
||||
cp vendor/ffmpeg-bin/lib/libavcodec-musikcube.so.59 ./bin/plugins/
|
||||
cp vendor/ffmpeg-bin/lib/libavformat-musikcube.so.59 ./bin/plugins
|
||||
cp vendor/ffmpeg-bin/lib/libavutil-musikcube.so.57 ./bin/plugins
|
||||
cp vendor/ffmpeg-bin/lib/libswresample-musikcube.so.4 ./bin/plugins
|
||||
|
9
script/stage-static-vendor-libraries.sh
Executable file
9
script/stage-static-vendor-libraries.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p bin/plugins/
|
||||
cp vendor/boost-bin/lib/libboost_filesystem.so.1.78.0 ./bin/
|
||||
cp vendor/boost-bin/lib/libboost_thread.so.1.78.0 ./bin/
|
||||
cp vendor/ffmpeg-bin/lib/libavcodec-musikcube.so.59 ./bin/plugins/
|
||||
cp vendor/ffmpeg-bin/lib/libavformat-musikcube.so.59 ./bin/plugins
|
||||
cp vendor/ffmpeg-bin/lib/libavutil-musikcube.so.57 ./bin/plugins
|
||||
cp vendor/ffmpeg-bin/lib/libswresample-musikcube.so.4 ./bin/plugins
|
Loading…
Reference in New Issue
Block a user