Skip to content

Commit

Permalink
moved ld flag to cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Bosonchenko committed Dec 5, 2017
1 parent b9c179f commit e4caa2d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ before_cache:

script:
- export CGO_CPPFLAGS="-I${HOME}/usr/include"
- export CGO_LDFLAGS="-L${HOME}/usr/lib -lopencv_core -lopencv_videoio -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lopencv_objdetect -lopencv_features2d -lopencv_video -lopencv_xfeatures2d"
- export CGO_LDFLAGS="-L${HOME}/usr/lib -lopencv_core -lopencv_videoio -lopencv_face -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lopencv_objdetect -lopencv_features2d -lopencv_video -lopencv_xfeatures2d"
- echo "Ensuring code is well formatted"; ! gofmt -s -d . | read
- go test -coverprofile=coverage.txt -covermode=atomic
- go test ./contrib -coverprofile=contrib.txt -covermode=atomic; cat contrib.txt >> coverage.txt; rm contrib.txt;
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ install:
- cd c:\gopath\src\gocv.io\x\gocv
- go get -d .
- set CGO_CPPFLAGS=-IC:\opencv\build\install\include
- set CGO_LDFLAGS=-LC:\opencv\build\install\x64\mingw\lib -lopencv_core331 -lopencv_videoio331 -lopencv_imgproc331 -lopencv_highgui331 -lopencv_imgcodecs331 -lopencv_objdetect331 -lopencv_features2d331 -lopencv_video331 -lopencv_xfeatures2d331
- set CGO_LDFLAGS=-LC:\opencv\build\install\x64\mingw\lib -lopencv_core331 -lopencv_face331-lopencv_videoio331 -lopencv_imgproc331 -lopencv_highgui331 -lopencv_imgcodecs331 -lopencv_objdetect331 -lopencv_features2d331 -lopencv_video331 -lopencv_xfeatures2d331
- go env

build_script:
Expand Down
1 change: 0 additions & 1 deletion contrib/face.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package contrib

/*
#cgo LDFLAGS: -lopencv_face
#include <stdlib.h>
#include "face.h"
*/
Expand Down
4 changes: 2 additions & 2 deletions env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ elif [[ "$uname_val" == "Linux" ]]; then
if [[ -f /etc/pacman.conf ]]; then
export CGO_CPPFLAGS="-I/usr/include"
export CGO_CXXFLAGS="--std=c++1z"
export CGO_LDFLAGS="-L/lib64 -lopencv_core -lopencv_videoio -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lopencv_objdetect -lopencv_features2d -lopencv_video -lopencv_xfeatures2d"
export CGO_LDFLAGS="-L/lib64 -lopencv_core -lopencv_face -lopencv_videoio -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lopencv_objdetect -lopencv_features2d -lopencv_video -lopencv_xfeatures2d"
else
export CGO_CPPFLAGS="-I/usr/local/include"
export CGO_CXXFLAGS="--std=c++1z"
export CGO_LDFLAGS="-L/usr/local/lib -lopencv_core -lopencv_videoio -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lopencv_objdetect -lopencv_features2d -lopencv_video -lopencv_xfeatures2d"
export CGO_LDFLAGS="-L/usr/local/lib -lopencv_core -lopencv_face -lopencv_videoio -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lopencv_objdetect -lopencv_features2d -lopencv_video -lopencv_xfeatures2d"
fi
echo "Environment variables configured for Linux"
else
Expand Down

0 comments on commit e4caa2d

Please sign in to comment.