Skip to content

Commit

Permalink
Merge pull request #223 from mmuman/misc-patches
Browse files Browse the repository at this point in the history
Misc build system patches
  • Loading branch information
piernov committed Nov 15, 2021
2 parents 9359da4 + d662187 commit d14a04b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
17 changes: 5 additions & 12 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/sh

TPUT_B="$(tput bold)"
TPUT_0="$(tput sgr0)"

color() {
color="$1"
text="$2"
echo "$(tput bold; tput setaf ${color})${text}$(tput sgr0)"
echo "$TPUT_B$(tput setaf ${color})${text}$TPUT_0"
}

helpMsg() {
Expand All @@ -20,17 +23,7 @@ EOH

PROJECT="$(color 3 OpenBoardView)"
if [ -z $THREADS ]; then
THREADS=1
case "$(uname -s)" in
*Darwin*|*BSD*)
THREADS=`sysctl -n hw.ncpu`
;;
*)
if [ -r "/proc/cpuinfo" ]; then
THREADS=`cat /proc/cpuinfo | grep processor | wc -l`
fi
;;
esac
THREADS="$(getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1)"
fi
ARG_LENGTH=$#
if [ "$1" = "--help" ]; then
Expand Down
2 changes: 1 addition & 1 deletion src/openboardview/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ find_package(PkgConfig REQUIRED)
add_definitions(-DENABLE_FONTCONFIG)
endif()

pkg_search_module(GTK REQUIRED gtk+-3.0 gtk+-2.0) # gtk2 fallback if gtk3 not found
pkg_search_module(GTK gtk+-3.0 gtk+-2.0) # gtk2 fallback if gtk3 not found
if(GTK_FOUND)
message(STATUS "Found GTK version ${GTK_VERSION}")
link_directories(${GTK_LIBRARY_DIRS}) # not linked since we load it at runtime
Expand Down

0 comments on commit d14a04b

Please sign in to comment.