I am trying to build a sample application by referring to the CMakeLists.txt which comes along with argus samples. I am currently referring to CMakeLists.txt in “multiSensor” sample as I am trying to do something similar to this sample. My CMakeLists.txt looks like the following :
make_minimum_required(VERSION 2.8)
project( projectname )
set(CMAKE_MODULE_PATH “/home/user/Downloads/argus/cmake” “${CMAKE_MODULE_PATH}”)
find_package(Argus REQUIRED)
find_package(OpenGLES REQUIRED)
find_package(EGL REQUIRED)
find_package( OpenCV REQUIRED )
include_directories(${ARGUS_INCLUDE_DIR} ${EGL_INCLUDE_DIR} ${OPENGLES_INCLUDE_DIR} /home/user/Downloads/samples/utils ${OpenCV_INCLUDE_DIRS} )
pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0)
include_directories(${GSTREAMER_INCLUDE_DIRS})
#set( CMAKE_VERBOSE_MAKEFILE on )
add_subdirectory(ci)
add_compile_options(-std=c++14)
add_executable( projectname main.cpp )
target_link_libraries( projectname /usr/lib/x86_64-linux-gnu/libcuinj64.so ${OpenCV_LIBS} ${ARGUS_LIBRARIES} ${OPENGLES_LIBRARIES} ${GSTREAMER_LIBRARIES} ci )
In “ci” subdirectory I have the following files:
- multiSensor.cpp
- CMakeLists.txt which looks like this :
set (ci_source_files
multiSensor.cpp
)
add_compile_options(-std=c++14)
add_library(ci ${ci_source_files})
When I try to build I get the following error :
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find Argus (missing: ARGUS_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
/home/ubuntu/Downloads/argus/cmake/FindArgus.cmake:55 (find_package_handle_standard_args)
CMakeLists.txt:6 (find_package)
– Configuring incomplete, errors occurred!
Kindly help me by advising where I am making a mistake. When I try to build “argus” samples, they get built successfully. I am not able to figure out how this CMakeLists.txt is different from the one in the samples folder.
Thanks.