CMakeLists.txt 379 B

1234567891011121314
  1. cmake_minimum_required( VERSION 3.0 )
  2. project( main )
  3. find_package( PkgConfig REQUIRED )
  4. pkg_check_modules( MYPKGS REQUIRED armadillo )
  5. include_directories( ${MYPKGS_INCLUDE_DIRS} )
  6. add_library( toto STATIC toto.cpp )
  7. target_link_libraries( toto ${MYPKGS_LIBRARIES} )
  8. add_executable( main main.cpp )
  9. target_link_libraries( main toto )
  10. install( TARGETS main DESTINATION bin )