Skip to content

Instantly share code, notes, and snippets.

@leannejdong
Created August 30, 2021 21:04
Show Gist options
  • Save leannejdong/5967e242e42de9a430c02849a8eb1a99 to your computer and use it in GitHub Desktop.
Save leannejdong/5967e242e42de9a430c02849a8eb1a99 to your computer and use it in GitHub Desktop.
cmake_minimum_required(VERSION 3.12)
project(SimpleSolve)
set(CMAKE_CXX_STANDARD 20)
find_package(Eigen3 3.3 REQUIRED NO_MODULE)
find_package(range)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
add_library(SimpleSolve INTERFACE) #this allows cmake to build the .so or .a file
target_include_directories(SimpleSolve INTERFACE include/)
target_link_libraries(SimpleSolve INTERFACE Eigen3::Eigen)
install(TARGETS SimpleSolve DESTINATION /usr/lib)
install(FILES include/iteration.h DESTINATION include)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment