Skip to content

Commit

Permalink
Added .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lebarsfa committed Jul 14, 2020
1 parent d1d39b2 commit 2bc1cb2
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 9 deletions.
62 changes: 62 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
language: cpp
jobs:
include:
- name: "Ubuntu 18.04"
os: linux
dist: bionic
compiler: gcc
before_install:
- sudo apt-get -q update || true
- sudo apt-get install -y libopencv-dev libgtk2.0
- wget https://github.com/ENSTABretagneRobotics/OSUtils/archive/master.zip && unzip -q -o master.zip && mv -f OSUtils-master ../OSUtils && rm -Rf master.zip
- wget https://github.com/ENSTABretagneRobotics/Extensions/archive/master.zip && unzip -q -o master.zip && mv -f Extensions-master ../Extensions && rm -Rf master.zip
script:
- cmake . && cmake --build .

- name: "Mac OS"
os: osx
osx_image: xcode10.1
before_install:
- brew install opencv@2
- brew link --force opencv@2
- wget https://github.com/ENSTABretagneRobotics/OSUtils/archive/master.zip && unzip -q -o master.zip && mv -f OSUtils-master ../OSUtils && rm -Rf master.zip
- wget https://github.com/ENSTABretagneRobotics/Extensions/archive/master.zip && unzip -q -o master.zip && mv -f Extensions-master ../Extensions && rm -Rf master.zip
script:
- cmake . && cmake --build .

- name: "Windows Visual Studio 2017 x64"
os: windows
before_install:
- choco install -y opencv --version=3.4.8 --package-parameters '/Environment:C:\tools\opencv\build'
- wget https://github.com/ENSTABretagneRobotics/OSUtils/archive/master.zip && unzip -q -o master.zip && mv -f OSUtils-master ../OSUtils && rm -Rf master.zip
- wget https://github.com/ENSTABretagneRobotics/Extensions/archive/master.zip && unzip -q -o master.zip && mv -f Extensions-master ../Extensions && rm -Rf master.zip
script:
- cmd //c "refreshenv.cmd & cmake -G "Visual Studio 15" -A x64 -D OpenCV_ARCH=x64 -D OpenCV_RUNTIME=vc15 . & cmake --build . --config Release"

- name: "Windows MinGW 8.1.0 x64"
os: windows
compiler: gcc
env:
- OPENCV_DIR=/c/OpenCV3.2.0
- PATH=/c/OpenCV3.2.0/x64/mingw/bin:$PATH
before_install:
- choco install -y make
- wget http://www.ensta-bretagne.fr/lebars/Share/OpenCV3.2.0_mini.zip --no-check-certificate -nv
- cmd //c "7z x OpenCV3.2.0_mini.zip -o"%SystemDrive%" -y"
- wget https://github.com/ENSTABretagneRobotics/OSUtils/archive/master.zip && unzip -q -o master.zip && mv -f OSUtils-master ../OSUtils && rm -Rf master.zip
- wget https://github.com/ENSTABretagneRobotics/Extensions/archive/master.zip && unzip -q -o master.zip && mv -f Extensions-master ../Extensions && rm -Rf master.zip
script:
- cmake -G "MSYS Makefiles" . && cmake --build .
#- cmake -G "MSYS Makefiles" -D OpenCV_ARCH=x64 -D OpenCV_RUNTIME=mingw . && cmake --build .

- name: "Ubuntu 12.04"
os: linux
dist: precise
compiler: gcc
before_install:
- sudo apt-get -q update || true
- sudo apt-get install -y libopencv-dev libgtk2.0
- wget https://github.com/ENSTABretagneRobotics/OSUtils/archive/master.zip && unzip -q -o master.zip && mv -f OSUtils-master ../OSUtils && rm -Rf master.zip
- wget https://github.com/ENSTABretagneRobotics/Extensions/archive/master.zip && unzip -q -o master.zip && mv -f Extensions-master ../Extensions && rm -Rf master.zip
script:
- cmake . && cmake --build .
3 changes: 3 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
30
Added .travis.yml.

29
Enabled USE_OPENCV_HIGHGUI_CPP_API as a workaround to get back working camera with OpenCV 3.2.0, however this is currently incompatible with Kinect v2.
Added CMakeLists.txt.
Expand Down
17 changes: 14 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@ project(RemoteWebcamMultiSrv)

find_package(OpenCV)
include_directories(${OpenCV_INCLUDE_DIRS})
option(USE_OPENCV_HIGHGUI_CPP_API "USE_OPENCV_HIGHGUI_CPP_API" ON)
option(USE_OPENCV_HIGHGUI_CPP_API "USE_OPENCV_HIGHGUI_CPP_API" OFF)
if(USE_OPENCV_HIGHGUI_CPP_API)
add_definitions(-D USE_OPENCV_HIGHGUI_CPP_API)
endif()

include_directories("${PROJECT_SOURCE_DIR}/../OSUtils")
include_directories("${PROJECT_SOURCE_DIR}/../Extensions/Img")
include_directories("${PROJECT_SOURCE_DIR}/../Extensions/Net")

add_executable(RemoteWebcamCli RemoteWebcamCli/Main.c RemoteWebcamCli/Globals.c ../OSUtils/OSTime.c ../OSUtils/OSNet.c ../OSUtils/OSMisc.c ../OSUtils/OSCore.c)
add_executable(RemoteWebcamMultiSrv RemoteWebcamMultiSrv/Main.cpp RemoteWebcamMultiSrv/Globals.cpp ../OSUtils/OSTimer.c ../OSUtils/OSTime.c ../OSUtils/OSThread.c ../OSUtils/OSNet.c ../OSUtils/OSMisc.c ../OSUtils/OSEv.c ../OSUtils/OSCriticalSection.c ../OSUtils/OSCore.c)

set_source_files_properties(RemoteWebcamCli/Main.c RemoteWebcamCli/Globals.c PROPERTIES LANGUAGE CXX) # Needed for recent versions of OpenCV (> 3.2.0?)...

if(OpenCV_VERSION VERSION_LESS "4")
else()
if(MSVC)
Expand All @@ -37,13 +40,21 @@ if(WIN32)
endif()
else()
if(APPLE)
add_definitions(-D USE_OLD_CHRONO -D USE_OLD_TIMER)
target_link_libraries(RemoteWebcamCli pthread m)
target_link_libraries(RemoteWebcamMultiSrv pthread m)
else()
target_link_libraries(RemoteWebcamCli pthread m)
target_link_libraries(RemoteWebcamMultiSrv pthread m)
target_link_libraries(RemoteWebcamCli pthread rt m)
target_link_libraries(RemoteWebcamMultiSrv pthread rt m)
endif()
endif()

set_target_properties(RemoteWebcamCli PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/RemoteWebcamCli")
set_target_properties(RemoteWebcamMultiSrv PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/RemoteWebcamMultiSrv")

# Will only work in Release for MSVC, need to manually remove those lines if needed to build in Debug...
# https://gitlab.kitware.com/cmake/cmake/-/issues/12566
if(WIN32 AND ((CMAKE_BUILD_TYPE MATCHES Release) OR MSVC))
set_target_properties(RemoteWebcamCli PROPERTIES WIN32_EXECUTABLE TRUE)
set_target_properties(RemoteWebcamMultiSrv PROPERTIES WIN32_EXECUTABLE TRUE)
endif()
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CXX = g++
CFLAGS += -O3
CFLAGS += -Wall -Wextra
#CFLAGS += -Winline
CFLAGS += -I. -I../OSUtils -I../Extensions/Img
CFLAGS += -I. -I../OSUtils -I../Extensions/Img -I../Extensions/Net
#CFLAGS += -D _DEBUG -D _DEBUG_DISPLAY
#CFLAGS += -D _DEBUG_MESSAGES
#CFLAGS += -D DISABLE_GUI_REMOTEWEBCAMMULTISRV
Expand All @@ -25,6 +25,9 @@ CFLAGS += -D OPENCV320
# For MinGW
#CFLAGS += -D ENABLE_GETTIMEOFDAY_WIN32 -D DISABLE_TIMEZONE_STRUCT_REDEFINITION

# Depending on your OS (old Linux or Mac OS)...
#CFLAGS += -D USE_OLD_CHRONO -D USE_OLD_TIMER

CXXFLAGS += $(CFLAGS) -fpermissive

# Might be necessary for recent GCC versions...
Expand All @@ -38,7 +41,7 @@ CXXFLAGS += $(CFLAGS) -fpermissive
LDFLAGS += -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lopencv_videoio

# For MinGW
#LDFLAGS += -lWinMM -lws2_32 -lpthread -lm
#LDFLAGS += -lWinMM -lws2_32 -lm

# For Mac OS
#LDFLAGS += -lpthread -lm
Expand Down
5 changes: 3 additions & 2 deletions RemoteWebcamCli/RemoteWebcamCli.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\OSUtils;..\..\Extensions\Img;$(SystemDrive)\OpenCV3.2.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\OSUtils;..\..\Extensions\Img;..\..\Extensions\Net;$(SystemDrive)\OpenCV3.2.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_DEBUG_DISPLAY;_DEBUG_MESSAGES;OPENCV320;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
Expand All @@ -76,7 +76,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\OSUtils;..\..\Extensions\Img;$(SystemDrive)\OpenCV3.2.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\OSUtils;..\..\Extensions\Img;..\..\Extensions\Net;$(SystemDrive)\OpenCV3.2.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;OPENCV320;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
Expand Down Expand Up @@ -104,6 +104,7 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Extensions\Img\CvInc.h" />
<ClInclude Include="..\..\Extensions\Net\httpUtils.h" />
<ClInclude Include="Globals.h" />
<ClInclude Include="..\..\OSUtils\OSCore.h" />
<ClInclude Include="..\..\OSUtils\OSMisc.h" />
Expand Down
6 changes: 6 additions & 0 deletions RemoteWebcamCli/RemoteWebcamCli.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
<Filter Include="Input Files">
<UniqueIdentifier>{87ed59da-796e-4b79-99ff-99f82a8cb3ba}</UniqueIdentifier>
</Filter>
<Filter Include="Extensions\Net">
<UniqueIdentifier>{25cc695b-4518-485e-8df4-d737f120b221}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Globals.c">
Expand Down Expand Up @@ -65,6 +68,9 @@
<ClInclude Include="..\..\Extensions\Img\CvInc.h">
<Filter>Extensions\Img</Filter>
</ClInclude>
<ClInclude Include="..\..\Extensions\Net\httpUtils.h">
<Filter>Extensions\Net</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Text Include="RemoteWebcamCli.txt">
Expand Down
5 changes: 3 additions & 2 deletions RemoteWebcamMultiSrv/RemoteWebcamMultiSrv.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(KINECTSDK20_DIR)\inc;..\..\OSUtils;..\..\Extensions\Img;$(SystemDrive)\OpenCV3.2.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(KINECTSDK20_DIR)\inc;..\..\OSUtils;..\..\Extensions\Img;..\..\Extensions\Net;$(SystemDrive)\OpenCV3.2.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_DEBUG_DISPLAY;_DEBUG_MESSAGES;OPENCV320;USE_OPENCV_HIGHGUI_CPP_API;ENABLE_CVKINECT2SDKHOOK;ENABLE_GETTIMEOFDAY_WIN32;DISABLE_TIMEZONE_STRUCT_REDEFINITION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
Expand All @@ -76,7 +76,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>$(KINECTSDK20_DIR)\inc;..\..\OSUtils;..\..\Extensions\Img;$(SystemDrive)\OpenCV3.2.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(KINECTSDK20_DIR)\inc;..\..\OSUtils;..\..\Extensions\Img;..\..\Extensions\Net;$(SystemDrive)\OpenCV3.2.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;OPENCV320;USE_OPENCV_HIGHGUI_CPP_API;ENABLE_CVKINECT2SDKHOOK;ENABLE_GETTIMEOFDAY_WIN32;DISABLE_TIMEZONE_STRUCT_REDEFINITION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
Expand Down Expand Up @@ -109,6 +109,7 @@
<ItemGroup>
<ClInclude Include="..\..\Extensions\Img\CvInc.h" />
<ClInclude Include="..\..\Extensions\Img\CvKinect2SDKHook.h" />
<ClInclude Include="..\..\Extensions\Net\httpUtils.h" />
<ClInclude Include="..\..\OSUtils\OSCriticalSection.h" />
<ClInclude Include="..\..\OSUtils\OSEv.h" />
<ClInclude Include="..\..\OSUtils\OSThread.h" />
Expand Down
6 changes: 6 additions & 0 deletions RemoteWebcamMultiSrv/RemoteWebcamMultiSrv.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
<Filter Include="Input Files">
<UniqueIdentifier>{d25e9c94-697f-4210-a8fe-efae32813e36}</UniqueIdentifier>
</Filter>
<Filter Include="Extensions\Net">
<UniqueIdentifier>{5004d7f7-c847-4ceb-8150-9f28b957a721}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\OSUtils\OSCore.c">
Expand Down Expand Up @@ -92,6 +95,9 @@
<ClInclude Include="..\..\Extensions\Img\CvInc.h">
<Filter>Extensions\Img</Filter>
</ClInclude>
<ClInclude Include="..\..\Extensions\Net\httpUtils.h">
<Filter>Extensions\Net</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Text Include="RemoteWebcamMultiSrv.txt">
Expand Down

0 comments on commit 2bc1cb2

Please sign in to comment.