Skip to content

Commit e01cfe7

Browse files
author
unknown
committed
initial import
1 parent 4330624 commit e01cfe7

25 files changed

Lines changed: 3609 additions & 0 deletions

tutorial_exercises/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
cmake_minimum_required ( VERSION 2.8 )
2+
project ( tutorial_exercises )
3+
4+
add_subdirectory ( exercise1 )
5+
add_subdirectory ( exercise2 )
6+
add_subdirectory ( easy_exercise1 )
7+
add_subdirectory ( easy_exercise2 )
8+
add_subdirectory ( solution_exercise1 )
9+
add_subdirectory ( solution_exercise2 )
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright (c) 2016 The Khronos Group Inc.
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a
4+
# copy of this software and/or associated documentation files (the
5+
# "Materials"), to deal in the Materials without restriction, including
6+
# without limitation the rights to use, copy, modify, merge, publish,
7+
# distribute, sublicense, and/or sell copies of the Materials, and to
8+
# permit persons to whom the Materials are furnished to do so, subject to
9+
# the following conditions:
10+
#
11+
# The above copyright notice and this permission notice shall be included
12+
# in all copies or substantial portions of the Materials.
13+
#
14+
# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18+
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19+
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20+
# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
21+
22+
cmake_minimum_required ( VERSION 2.8 )
23+
project ( easy_exercise1 )
24+
aux_source_directory ( . SRC_LIST )
25+
set ( VX_PATH /home/openvx/openvx_sample/install/Linux/x64 )
26+
27+
if( CMAKE_BUILD_TYPE MATCHES ".*Deb.*" )
28+
link_directories ( ${VX_PATH}/Debug/bin )
29+
else()
30+
link_directories ( ${VX_PATH}/Release/bin )
31+
endif()
32+
33+
include_directories ( ${VX_PATH}/Release/include )
34+
add_executable ( ${PROJECT_NAME} ${SRC_LIST} )
35+
target_link_libraries ( easy_exercise1 openvx vxu opencv_imgproc opencv_highgui opencv_core )
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright (c) 2016 The Khronos Group Inc.
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a
4+
# copy of this software and/or associated documentation files (the
5+
# "Materials"), to deal in the Materials without restriction, including
6+
# without limitation the rights to use, copy, modify, merge, publish,
7+
# distribute, sublicense, and/or sell copies of the Materials, and to
8+
# permit persons to whom the Materials are furnished to do so, subject to
9+
# the following conditions:
10+
#
11+
# The above copyright notice and this permission notice shall be included
12+
# in all copies or substantial portions of the Materials.
13+
#
14+
# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18+
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19+
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20+
# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
21+
22+
OPENVX_INSTALL_DIR ?= /home/openvx/openvx_sample/install/Linux/x64/Release
23+
IDIRS ?= /usr/include $(OPENVX_INSTALL_DIR)/include
24+
25+
CPP_FILES = $(wildcard *.cpp)
26+
27+
ODIR = obj
28+
OBJ_FILES = $(CPP_FILES:.cpp=.o)
29+
OBJ = $(patsubst %,$(ODIR)/%,$(OBJ_FILES))
30+
31+
LDIRS = $(OPENVX_INSTALL_DIR)/bin
32+
LIBS = m openvx vxu opencv_highgui opencv_imgproc opencv_core
33+
34+
TARGET = easy_exercise1
35+
36+
CC = g++
37+
CFLAGS = -g
38+
39+
$(TARGET) : $(OBJ)
40+
$(CC) -o $@ $^ $(CFLAGS) -Wl,-rpath,$(OPENVX_INSTALL_DIR)/bin \
41+
$(patsubst %,-L%,$(LDIRS)) $(patsubst %,-l%,$(LIBS))
42+
43+
$(ODIR)/%.o: %.cpp
44+
@mkdir -p $(ODIR)
45+
$(CC) -c $(patsubst %,-I%,$(IDIRS)) -o $@ $< $(CFLAGS)
46+
47+
clean :
48+
rm -rf $(ODIR)
49+
rm -f $(TARGET)

0 commit comments

Comments
 (0)