Skip to content

Commit

Permalink
Started getting cmake scripts into a more reasonable form.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnew committed Jun 14, 2015
1 parent 287c4b3 commit 46dac73
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 21 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
# All bin directories
bin/
build/
release/
debug/
!sub/bin

# Ignore video/image files
Expand Down
22 changes: 22 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
cmake_minimum_required (VERSION 2.8)
project (OAT)

# C++11
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

# Boost
set (BOOST_ROOT /opt/boost_1_57_0 )
find_package (Boost REQUIRED system thread program_options filesystem)
link_directories (${Boost_LIBRARY_DIR})

# OpenCV
find_package (OpenCV REQUIRED)

# oat shared memory lib
add_subdirectory("../lib/shmem" "${CMAKE_CURRENT_BINARY_DIR}/shmem_build")

# oat components
add_subdirectory(cleaner)
add_subdirectory(decorator)


11 changes: 2 additions & 9 deletions src/cleaner/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
cmake_minimum_required (VERSION 2.8)
project (Cleaner)
include_directories(${OAT_SOURCE_DIR}/cleaner)
link_directories(${OAT_SOURCE_DIR}/cleaner)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

set (BOOST_ROOT /opt/boost_1_57_0 )
find_package (Boost REQUIRED system thread program_options)
link_directories (${Boost_LIBRARY_DIR})

find_package (OpenCV REQUIRED)
add_executable (oat-clean main.cpp)
target_link_libraries (oat-clean ${OpenCV_LIBS} ${Boost_LIBRARIES})

14 changes: 2 additions & 12 deletions src/decorator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
cmake_minimum_required (VERSION 2.8)
project (Decorator)
#include_directories(${OAT_SOURCE_DIR}/cleaner)
#link_directories(${OAT_SOURCE_DIR}/cleaner)

set(SUB_NAME decorate)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

set (BOOST_ROOT /opt/boost_1_57_0 )
find_package (Boost REQUIRED system thread program_options)
link_directories (${Boost_LIBRARY_DIR})

add_subdirectory("../../lib/shmem" "${CMAKE_CURRENT_BINARY_DIR}/shmem_build")

find_package (OpenCV REQUIRED)
add_executable (oat-decorate Decorator.cpp main.cpp )
target_link_libraries (oat-decorate shmem ${OpenCV_LIBS} ${Boost_LIBRARIES})

Expand Down

0 comments on commit 46dac73

Please sign in to comment.