-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
31 lines (21 loc) · 1.04 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
cmake_minimum_required(VERSION 3.22)
set(CMAKE_BUILD_TYPE Release)
project(corner VERSION 0.0.2)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(libcornerinclude "${PROJECT_SOURCE_DIR}/libcorner/include")
set(libcornersource "${PROJECT_SOURCE_DIR}/libcorner/src")
find_package(OpenCV REQUIRED)
add_library(libcorner SHARED "${libcornerinclude}/libcorner.hpp" "${libcornersource}/libcorner.cpp")
set_target_properties(libcorner PROPERTIES PREFIX "lib")
set_target_properties(libcorner PROPERTIES OUTPUT_NAME "corner-${PROJECT_VERSION}")
target_include_directories(libcorner PRIVATE ${libcornerinclude})
target_link_libraries(libcorner PRIVATE ${OpenCV_LIBS})
install(TARGETS libcorner DESTINATION lib)
install(FILES "${libcornerinclude}/libcorner.hpp" DESTINATION innclude)
add_executable(corner corner.cpp)
target_include_directories(corner PRIVATE ${libcornerinclude})
target_link_libraries(corner PRIVATE ${OpenCV_LIBS} libcorner)
install(TARGETS corner DESTINATION bin)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
include(packages)