Skip to content

Commit

Permalink
Only add -lGL(U) on Linux builds
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Oct 14, 2024
1 parent 5350894 commit 4f7dcc2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion recipes/connectome-workbench/build_cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ cd build_cli
export CMAKE_ARGS="$CMAKE_ARGS -DWORKBENCH_BUILD_CLI=TRUE -DWORKBENCH_BUILD_GUI=FALSE"

### Identical between build_gui.sh and build_cli.sh
if [[ "$target_platform" == linux-* ]]; then
export CXX_FLAGS="$CXX_FLAGS -lGL -lGLU"
fi

cmake $CMAKE_ARGS -GNinja \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_PREFIX:STRING=$PREFIX \
-DCMAKE_CXX_FLAGS="-lGL -lGLU $CMAKE_CXX_FLAGS" \
../src

cmake --build .
Expand Down
5 changes: 4 additions & 1 deletion recipes/connectome-workbench/build_gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ cd build_gui

export CMAKE_ARGS="$CMAKE_ARGS -DWORKBENCH_BUILD_CLI=FALSE -DWORKBENCH_BUILD_GUI=TRUE"

if [[ "$target_platform" == linux-* ]]; then
export CXX_FLAGS="$CXX_FLAGS -lGL -lGLU"
fi

### Identical between build_gui.sh and build_cli.sh
cmake $CMAKE_ARGS -GNinja \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_PREFIX:STRING=$PREFIX \
-DCMAKE_CXX_FLAGS="-lGL -lGLU $CMAKE_CXX_FLAGS" \
../src

cmake --build .
Expand Down

0 comments on commit 4f7dcc2

Please sign in to comment.