Skip to content

Commit

Permalink
do not install headers
Browse files Browse the repository at this point in the history
  • Loading branch information
rainyl committed Oct 13, 2024
1 parent e0c5383 commit 6077718
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 28 deletions.
29 changes: 21 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,26 @@ if(DARTCV_WITH_HIGHGUI OR DARTCV_WITH_VIDEOIO OR DARTCV_WORLD)
find_package(FFMPEG REQUIRED)
endif()

set(DARTCV_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR})

message(STATUS "OpenCV library status:")
message(STATUS " config: ${OpenCV_DIR}")
message(STATUS " version: ${OpenCV_VERSION}")
message(STATUS " libraries: ${OpenCV_LIBS}")
message(STATUS " include path: ${OpenCV_INCLUDE_DIRS}")
message(STATUS "Project version: ${PROJECT_VERSION}")
set(DARTCV_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "DARTCV_INCLUDE_DIRS")

add_subdirectory(dartcv)

#install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
# DESTINATION ${CMAKE_INSTALL_PREFIX}/include
# COMPONENT header_files
# FILES_MATCHING
# PATTERN "*.h"
# PATTERN "t.h" EXCLUDE
# PATTERN "test" EXCLUDE
#)
install(TARGETS ${LIBRARY_NAME}
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
COMPONENT target_libs
)

if (DARTCV_WITH_HIGHGUI OR DARTCV_WITH_VIDEOIO OR DARTCV_WORLD)
install(TARGETS ${FFMPEG_LIBRARIES}
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
COMPONENT ffmpeg_libs
)
endif ()
20 changes: 0 additions & 20 deletions dartcv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,23 +164,3 @@ if (WIN32)
endif (WIN32)

target_compile_definitions(${LIBRARY_NAME} PUBLIC DART_SHARED_LIB)

install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include
COMPONENT header_files
FILES_MATCHING
PATTERN "*.h"
PATTERN "t.h" EXCLUDE
PATTERN "test" EXCLUDE
)
install(TARGETS ${LIBRARY_NAME}
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
COMPONENT target_libs
)

if (DARTCV_WITH_HIGHGUI OR DARTCV_WITH_VIDEOIO OR DARTCV_WORLD)
install(FILES ${FFMPEG_LIB_PATHS}
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
COMPONENT ffmpeg_libs
)
endif ()

0 comments on commit 6077718

Please sign in to comment.