Kompilasi Contoh-Contoh Program

Buat file yang bernama CMakeLists.txt.
cmake_minimum_required(VERSION 2.8)
project( DisplayImage )
find_package( OpenCV REQUIRED )
add_executable( NamaFileContoh NamaFileContoh.cpp )
target_link_libraries( NamaFileContoh ${OpenCV_LIBS} )
Kompilasi
cd <Direktri Contoh Kode>
cmake .
make

Referensi


  1. Using OpenCV with gcc and CMake, http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.html

No comments:

Post a Comment