mirror of
https://github.com/keystone-engine/keystone
synced 2026-06-08 15:15:30 +00:00
3e67c1d488
When compiling on linux, use GNUInstallDirs to automatically determine the appropriate libdir path for multi-arch builds instead of hardcoding lib/ or lib64/. GNUInstallDirs should follow the FHS appropriately for non-debian platforms that place libs in lib64/. This also removes the need to specify `lib64` on the command line when building for a non-debian system that follows the linux FHS. When compiling with cmake directly on debian and specifying `-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_LIBRARY_ARCHITECTURE=<arch>`, the libdir should be set to /usr/lib/<arch>/.
35 lines
639 B
Bash
Executable File
35 lines
639 B
Bash
Executable File
BUILDTYPE='Release'
|
|
|
|
# on MacOS, build universal binaries by default
|
|
ARCH='i386;x86_64'
|
|
|
|
# by default we do NOT build 32bit on 64bit system
|
|
LLVM_BUILD_32_BITS=0
|
|
|
|
# by default we build libraries & kstool
|
|
# but we can skip kstool & build libraries only
|
|
BUILD_LIBS_ONLY=0
|
|
|
|
while [ "$1" != "" ]; do
|
|
case $1 in
|
|
lib_only)
|
|
BUILD_LIBS_ONLY=1
|
|
;;
|
|
lib32)
|
|
LLVM_BUILD_32_BITS=1
|
|
;;
|
|
debug)
|
|
BUILDTYPE='Debug'
|
|
;;
|
|
macos-no-universal)
|
|
ARCH='' # do not build MacOS universal binaries
|
|
;;
|
|
*)
|
|
echo "ERROR: unknown parameter \"$1\""
|
|
usage
|
|
exit 1
|
|
;;
|
|
esac
|
|
shift
|
|
done
|