Skip to content

Commit

Permalink
rename script
Browse files Browse the repository at this point in the history
  • Loading branch information
MoAlyousef committed Feb 17, 2025
1 parent 016bf64 commit e9910ec
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 82 deletions.
82 changes: 0 additions & 82 deletions scripts/bootstrap_common.sh

This file was deleted.

25 changes: 25 additions & 0 deletions scripts/bootstrap_msvc.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@echo off
setlocal enableextensions

cmake -B bin -S . ^
-DCMAKE_BUILD_TYPE=Release ^
-DFLTK_USE_SYSTEM_LIBPNG=OFF ^
-DFLTK_USE_SYSTEM_LIBJPEG=OFF ^
-DFLTK_USE_SYSTEM_LIBZLIB=OFF ^
-DFLTK_BUILD_GL=ON ^
-DCFLTK_USE_OPENGL=ON ^
-DFLTK_BUILD_EXAMPLES=OFF ^
-DFLTK_BUILD_TEST=OFF ^
-DFLTK_OPTION_LARGE_FILE=ON ^
-DFLTK_BUILD_HTML_DOCS=OFF ^
-DFLTK_BUILD_PDF_DOCS=OFF ^
-DFLTK_BUILD_FLUID=OFF ^
-DFLTK_BUILD_FLTK_OPTIONS=OFF ^
%*

cmake --build bin --config Release
cmake --install bin

echo.
echo Done!
endlocal
65 changes: 65 additions & 0 deletions scripts/bootstrap_posix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/bin/sh

set -e

COMMON_ARGS="
-DCMAKE_BUILD_TYPE=Release
-DFLTK_USE_SYSTEM_LIBPNG=OFF
-DFLTK_USE_SYSTEM_LIBJPEG=OFF
-DFLTK_USE_SYSTEM_LIBZLIB=OFF
-DFLTK_BUILD_GL=ON
-DCFLTK_USE_OPENGL=ON
-DFLTK_BUILD_EXAMPLES=OFF
-DFLTK_BUILD_TEST=OFF
-DFLTK_OPTION_LARGE_FILE=ON
-DFLTK_BUILD_HTML_DOCS=OFF
-DFLTK_BUILD_PDF_DOCS=OFF
-DFLTK_BUILD_FLUID=OFF
-DFLTK_BUILD_FLTK_OPTIONS=OFF
"

# Linux/BSD gets these extras
LINUX_ARGS="
-DFLTK_USE_PANGO=ON
-DFLTK_GRAPHICS_CAIRO=ON
-DFLTK_USE_LIBDECOR_GTK=OFF
"

###############################################
# 3. Detect environment and configure + build #
###############################################

if [ -n "$MSYSTEM" ]; then
###########################
# MSYS2 / MinGW (Windows) #
###########################
echo "Detected MSYS2/MinGW environment..."

cmake -B bin -S . \
$COMMON_ARGS \
"$@"

elif [ "$(uname -s)" = "Darwin" ]; then
###########
# macOS #
###########
echo "Detected macOS environment..."

cmake -B bin -S . \
$COMMON_ARGS \
"$@"

else
#################################
# Linux or BSD (default branch) #
#################################
echo "Detected Linux or BSD environment..."

cmake -B bin -S . \
$COMMON_ARGS \
$LINUX_ARGS \
"$@"
fi

cmake --build bin --parallel
cmake --install bin

0 comments on commit e9910ec

Please sign in to comment.