Currently have Rectangle library set up; just need to implement the actual functions in the .cpp file. Also set Line library to begin creating the class and functions. Set up the CMake as well which was a bit of a pain. Also added the libraries branch to the setup scripts. Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
62 lines
1.7 KiB
CMake
62 lines
1.7 KiB
CMake
cmake_minimum_required(VERSION 3.22)
|
|
project(imagemanipulation_libraries
|
|
VERSION 0.1
|
|
DESCRIPTION "Libraries for image preprocessing"
|
|
LANGUAGES CXX)
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
find_package(OpenCV REQUIRED)
|
|
|
|
|
|
|
|
# RECTANGLE
|
|
|
|
add_library(rect SHARED src/rectangle.cpp)
|
|
|
|
target_compile_features(rect PRIVATE cxx_std_20)
|
|
|
|
# set_target_properties(rect PROPERTIES VERSION ${PROJECT_VERSION}) # git can't deal with the symlinks for some reason
|
|
|
|
# set_target_properties(rect PROPERTIES PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/include/rect_lib.h)
|
|
|
|
set_target_properties(rect PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
|
|
|
|
|
|
target_link_libraries(rect ${OpenCV_LIBS})
|
|
|
|
target_include_directories(rect
|
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
|
|
PRIVATE ${OpenCV_INCLUDE_DIRS})
|
|
|
|
|
|
# LINE
|
|
|
|
add_library(line SHARED src/line.cpp)
|
|
|
|
target_compile_features(line PRIVATE cxx_std_20)
|
|
|
|
# set_target_properties(line PROPERTIES VERSION ${PROJECT_VERSION}) # git can't deal with the symlinks for some reason
|
|
|
|
# set_target_properties(line PROPERTIES PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/include/line_lib.h)
|
|
|
|
set_target_properties(line PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib)
|
|
|
|
|
|
target_link_libraries(line ${OpenCV_LIBS})
|
|
|
|
target_include_directories(line
|
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
|
|
PRIVATE ${OpenCV_INCLUDE_DIRS})
|
|
|
|
|
|
# install(TARGETS rect
|
|
# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
# PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
|
|
|
# find_package(OpenCV REQUIRED)
|
|
|
|
# target_include_directories(CropperEx
|
|
# PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
|
|
# PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../externallibraries/stbimagehelpers
|
|
# PRIVATE ${OpenCV_INCLUDE_DIRS}) |