From 8fa596409c0f25451012527859ad0df5eafabfa7 Mon Sep 17 00:00:00 2001 From: Edward Rosten Date: Thu, 15 Aug 2019 13:19:15 +0100 Subject: [PATCH 1/4] Create more complete config cmake --- CMakeLists.txt | 89 +++++-------------------------------- cmake/CVDConfig.cmake | 8 +++- cmake/CVDFindAllDeps.cmake | 50 +++++++++++++++++++++ cmake/CVDFindFFMPEG.cmake | 72 ++++++++++++++++++++++++++++++ cmake/CVDFindTooN.cmake | 25 +++++++++++ cmake/CVDFinddc1394v2.cmake | 20 +++++++++ cmake/FindTooN.cmake | 25 ----------- cmake/Finddc1394v2.cmake | 29 ------------ 8 files changed, 183 insertions(+), 135 deletions(-) create mode 100644 cmake/CVDFindAllDeps.cmake create mode 100644 cmake/CVDFindFFMPEG.cmake create mode 100644 cmake/CVDFindTooN.cmake create mode 100644 cmake/CVDFinddc1394v2.cmake delete mode 100644 cmake/FindTooN.cmake delete mode 100644 cmake/Finddc1394v2.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index e726def4..0418ac36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,19 +9,10 @@ option(CVD_ENABLE_EXAMPLES "Build libCVD examples" ON) include(TestBigEndian) include(CheckSymbolExists) -list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) set(CMAKE_DEBUG_POSTFIX _debug) # Dependencies that can be automatically found by CMake. - -find_package(JPEG) -find_package(PNG) -find_package(TIFF) -find_package(TooN) -find_package(X11) -find_package(dc1394v2) -find_package(OpenGL) -find_package(Threads REQUIRED) +include(CVDFindDepsAll) # Detect endianness @@ -179,7 +170,7 @@ set(HEADERS # Library-specific source files, headers and definitions. -if(dc1394_FOUND) +if(CVD_dc1394v2_FOUND) list(APPEND SRCS cvd_src/videosource_dvbuffer.cc cvd_src/Linux/dvbuffer3_dc1394v2.cc) @@ -246,39 +237,18 @@ else() endif() -find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h) -find_library(AVCODEC_LIBRARY NAMES avcodec) -find_path(AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h) -find_library(AVDEVICE_LIBRARY NAMES avdevice) -find_path(AVFORMAT_INCLUDE_DIR libavformat/avformat.h) -find_library(AVFORMAT_LIBRARY NAMES avformat) -find_library(AVUTIL_LIBRARY NAMES avutil) -find_path(SWSCALE_INCLUDE_DIR libswscale/swscale.h) -find_library(SWSCALE_LIBRARY NAMES swscale) -find_library(SWRESAMPLE_LIBRARY NAMES swresample) -find_library(AVFILTER_LIBRARY NAMES avfilter) -if((AVCODEC_LIBRARY STREQUAL "AVCODEC_LIBRARY-NOTFOUND") OR - (AVDEVICE_LIBRARY STREQUAL "AVDEVICE_LIBRARY-NOTFOUND") OR - (AVFORMAT_LIBRARY STREQUAL "AVFORMAT_LIBRARY-NOTFOUND") OR - (AVUTIL_LIBRARY STREQUAL "AVUTIL_LIBRARY-NOTFOUND") OR - (SWSCALE_LIBRARY STREQUAL "SWSCALE_LIBRARY-NOTFOUND") OR - (AVCODEC_INCLUDE_DIR STREQUAL "AVCODEC_INCLUDE_DIR-NOTFOUND") OR - (AVDEVICE_INCLUDE_DIR STREQUAL "AVDEVICE_INCLUDE_DIR-NOTFOUND") OR - (AVFORMAT_INCLUDE_DIR STREQUAL "AVFORMAT_INCLUDE_DIR-NOTFOUND") OR - (SWSCALE_INCLUDE_DIR STREQUAL "SWSCALE_INCLUDE_DIR-NOTFOUND")) - set(CVD_HAVE_FFMPEG OFF) - message(STATUS "FFMPEG - not found") - list(APPEND SRCS - cvd_src/videosource_novideofilebuffer.cc) -else() - message(STATUS "FFMPEG - found") +if(CVD_FFMPEG_FOUND) set(CVD_HAVE_FFMPEG ON) list(APPEND SRCS cvd_src/videofilebuffer2.cc cvd_src/videosource_videofilebuffer.cc) +else() + set(CVD_HAVE_FFMPEG OFF) + list(APPEND SRCS + cvd_src/videosource_novideofilebuffer.cc) endif() -if(TooN_FOUND) +if(CVD_TooN_FOUND) set(CVD_HAVE_TOON ON) list(APPEND SRCS cvd_src/brezenham.cc @@ -328,49 +298,10 @@ configure_file(cmake/config_internal.h.in include/cvd_src/config_internal.h) add_library(${PROJECT_NAME} ${SRCS} ${HEADERS}) target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_14) -target_include_directories(${PROJECT_NAME} PUBLIC "${PROJECT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/include") +target_include_directories(${PROJECT_NAME} PUBLIC "${PROJECT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/include" ${CVD_DEP_INCLUDES_PUBLIC} PRIVATE ${CVD_DEP_INCLUDES_PRIVATE}) +target_link_libraries(${PROJECT_NAME} PRIVATE ${CVD_DEP_LIBS}) -if(CVD_HAVE_FFMPEG) - target_include_directories(${PROJECT_NAME} PRIVATE ${AVCODEC_INCLUDE_DIR} ${AVDEVICE_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR}) - target_link_libraries(${PROJECT_NAME} PRIVATE ${AVDEVICE_LIBRARY} ${AVFILTER_LIBRARY} ${AVFORMAT_LIBRARY} ${AVCODEC_LIBRARY} ${AVUTIL_LIBRARY} ${SWSCALE_LIBRARY} ${SWRESAMPLE_LIBRARY}) - - set(CVD_FFMPEG_LIKELY_X_LIBS Xv Xext Xau Xdmcp xcb-xfixes xcb-shape xcb-shm xcb dl) - foreach(l IN LISTS CVD_FFMPEG_LIKELY_X_LIBS) - find_library(CVD_TMP_${l} NAMES ${l}) - if(NOT (CVD_TMP_${l} STREQUAL "CVD_TMP_${l}-NOTFOUND")) - message(STATUS "Found ${l}: ${CVD_TMP_${l}}") - target_link_libraries(${PROJECT_NAME} PRIVATE ${CVD_TMP_${l}}) - endif() - endforeach() -endif() -target_link_libraries(${PROJECT_NAME} PRIVATE Threads::Threads) -if(JPEG_FOUND) - target_include_directories(${PROJECT_NAME} PRIVATE ${JPEG_INCLUDE_DIRS}) - target_link_libraries(${PROJECT_NAME} PRIVATE ${JPEG_LIBRARIES}) -endif() -if(TIFF_FOUND) - target_include_directories(${PROJECT_NAME} PRIVATE ${TIFF_INCLUDE_DIRS}) - target_link_libraries(${PROJECT_NAME} PRIVATE ${TIFF_LIBRARIES}) -endif() -if(PNG_FOUND) - target_include_directories(${PROJECT_NAME} PRIVATE ${PNG_INCLUDE_DIRS}) - target_link_libraries(${PROJECT_NAME} PRIVATE ${PNG_LIBRARIES}) -endif() -if(TooN_FOUND) - target_include_directories(${PROJECT_NAME} PUBLIC ${TooN_INCLUDE_DIRS}) -endif() -if(dc1394v2_FOUND) - target_include_directories(${PROJECT_NAME} PRIVATE ${dc1394v2_INCLUDE_DIRS}) - target_link_libraries(${PROJECT_NAME} PRIVATE ${dc1394v2_LIBRARIES}) -endif() -if(X11_FOUND) - target_include_directories(${PROJECT_NAME} PUBLIC ${X11_INCLUDE_DIR}) - target_link_libraries(${PROJECT_NAME} PUBLIC ${X11_LIBRARIES}) -endif() -if(OpenGL_OpenGL_FOUND) - target_link_libraries(${PROJECT_NAME} PUBLIC OpenGL::GL) -endif() if(WIN32) target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS) endif() diff --git a/cmake/CVDConfig.cmake b/cmake/CVDConfig.cmake index 69d41bd0..024e3392 100644 --- a/cmake/CVDConfig.cmake +++ b/cmake/CVDConfig.cmake @@ -15,6 +15,10 @@ # CVD_LIBRARIES - List of libraries when using CVD. # CVD_FOUND - True if CVD found. + +include(CVDFindDepsAll) + + find_path(CVD_INCLUDE_DIR NAMES cvd/config.h PATH_SUFFIXES include) find_library(CVD_LIBRARY_RELEASE NAMES cvd PATH_SUFFIXES lib) find_library(CVD_LIBRARY_DEBUG NAMES cvd_debug PATH_SUFFIXES lib) @@ -25,8 +29,8 @@ mark_as_advanced(CVD_LIBRARY_RELEASE CVD_LIBRARY_DEBUG) FIND_PACKAGE_HANDLE_STANDARD_ARGS(CVD REQUIRED_VARS CVD_LIBRARY CVD_INCLUDE_DIR) if(CVD_FOUND) - set(CVD_INCLUDE_DIRS ${CVD_INCLUDE_DIR}) - set(CVD_LIBRARIES ${CVD_LIBRARY}) + set(CVD_INCLUDE_DIRS ${CVD_INCLUDE_DIR} ${CVD_DEP_INCLUDES_PUBLIC}) + set(CVD_LIBRARIES ${CVD_LIBRARY} ${CVD_DEP_LIBS}) endif() mark_as_advanced(CVD_LIBRARY CVD_INCLUDE_DIR ) diff --git a/cmake/CVDFindAllDeps.cmake b/cmake/CVDFindAllDeps.cmake new file mode 100644 index 00000000..41181bb2 --- /dev/null +++ b/cmake/CVDFindAllDeps.cmake @@ -0,0 +1,50 @@ +find_package(JPEG) +find_package(PNG) +find_package(TIFF) +find_package(X11) +find_package(OpenGL) +find_package(Threads REQUIRED) + +include(CVDFindFFMPEG) +include(CVDFindTooN) +include(CVDFinddc1394v2) + +SET(CVD_DEP_INCLUDES_PUBLIC) +SET(CVD_DEP_INCLUDES_PRIVATE) +SET(CVD_DEP_LIBS) + +if(CVD_FFMPEG_FOUND) + list(APPEND CVD_DEP_INCLUDES_PRIVATE ${CVD_FFMPEG_INCLUDE_DIRS}) + list(APPEND CVD_DEP_LIBS ${CVD_FFMPEG_LIBRARIES}) +endif() + +list(APPEND CVD_DEP_LIBS Threads::Threads) +if(JPEG_FOUND) + list(APPEND CVD_DEP_INCLUDES_PRIVATE ${JPEG_INCLUDE_DIRS}) + list(APPEND CVD_DEP_LIBS ${JPEG_LIBRARIES}) +endif() +if(TIFF_FOUND) + list(APPEND CVD_DEP_INCLUDES_PRIVATE ${TIFF_INCLUDE_DIRS}) + list(APPEND CVD_DEP_LIBS ${TIFF_LIBRARIES}) +endif() +if(PNG_FOUND) + list(APPEND CVD_DEP_INCLUDES_PRIVATE ${PNG_INCLUDE_DIRS}) + list(APPEND CVD_DEP_LIBS ${PNG_LIBRARIES}) +endif() +if(CVD_TooN_FOUND) + list(APPEND CVD_DEP_INCLUDES_PUBLIC ${CVD_TooN_INCLUDE_DIRS}) +endif() +if(CVD_dc1394v2_FOUND) + list(APPEND CVD_DEP_INCLUDES_PRIVATE ${CVD_dc1394v2_INCLUDE_DIRS}) + list(APPEND CVD_DEP_LIBS ${CVD_dc1394v2_LIBRARIES}) +endif() +if(X11_FOUND) + list(APPEND CVD_DEP_INCLUDES_PUBLIC ${X11_INCLUDE_DIR}) + list(APPEND CVD_DEP_LIBS ${X11_LIBRARIES}) +endif() +if(OpenGL_OpenGL_FOUND) + list(APPEND CVD_DEP_LIBS ${OPENGL_gl_LIBRARY}) + list(APPEND CVD_DEP_INCLUDES_PUBLIC ${OPENGL_INCLUDE_DIR}) +endif() + + diff --git a/cmake/CVDFindFFMPEG.cmake b/cmake/CVDFindFFMPEG.cmake new file mode 100644 index 00000000..3c10232a --- /dev/null +++ b/cmake/CVDFindFFMPEG.cmake @@ -0,0 +1,72 @@ +find_package(X11) +find_package(Threads REQUIRED) + +find_path(CVD_AVCODEC_INCLUDE_DIR libavcodec/avcodec.h) +find_library(CVD_AVCODEC_LIBRARY NAMES avcodec) +find_path(CVD_AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h) +find_library(CVD_AVDEVICE_LIBRARY NAMES avdevice) +find_path(CVD_AVFORMAT_INCLUDE_DIR libavformat/avformat.h) +find_library(CVD_AVFORMAT_LIBRARY NAMES avformat) +find_library(CVD_AVUTIL_LIBRARY NAMES avutil) +find_path(CVD_SWSCALE_INCLUDE_DIR libswscale/swscale.h) +find_library(CVD_SWSCALE_LIBRARY NAMES swscale) +find_library(CVD_SWRESAMPLE_LIBRARY NAMES swresample) +find_library(CVD_AVFILTER_LIBRARY NAMES avfilter) + + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(CVD_FFMPEG REQUIRED_VARS + CVD_AVCODEC_INCLUDE_DIR CVD_AVCODEC_LIBRARY CVD_AVDEVICE_INCLUDE_DIR + CVD_AVDEVICE_LIBRARY CVD_AVFORMAT_INCLUDE_DIR CVD_AVFORMAT_LIBRARY + CVD_AVUTIL_LIBRARY CVD_SWSCALE_INCLUDE_DIR CVD_SWSCALE_LIBRARY + CVD_SWRESAMPLE_LIBRARY CVD_AVFILTER_LIBRARY) + +if(CVD_FFMPEG_FOUND) + message(STATUS "FFMPEG - found") + + set(CVD_FFMPEG_INCLUDE_DIRS ${CVD_AVCODEC_INCLUDE_DIR} + ${CVD_AVDEVICE_INCLUDE_DIR} ${CVD_AVFORMAT_INCLUDE_DIR} + ${CVD_SWSCALE_INCLUDE_DIR}) + + set(CVD_FFMPEG_LIBRARIES + ${CVD_AVDEVICE_LIBRARY} + ${CVD_AVFILTER_LIBRARY} + ${CVD_AVFORMAT_LIBRARY} + ${CVD_AVCODEC_LIBRARY} + ${CVD_AVUTIL_LIBRARY} + ${CVD_SWSCALE_LIBRARY} + ${CVD_SWRESAMPLE_LIBRARY} + ) + + + set(CVD_FFMPEG_LIKELY_X_LIBS xcb-xfixes xcb-shape xcb-shm xcb) + foreach(l IN LISTS CVD_FFMPEG_LIKELY_X_LIBS) + find_library(CVD_TMP_${l} NAMES ${l}) + if(NOT (CVD_TMP_${l} STREQUAL "CVD_TMP_${l}-NOTFOUND")) + message(STATUS "Found ${l}: ${CVD_TMP_${l}}") + list(APPEND CVD_FFMPEG_LIBRARIES ${CVD_TMP_${l}}) + endif() + endforeach() + + list(APPEND CVD_FFMPEG_LIBRARIES ${CMAKE_DL_LIBS} Threads::Threads) + + if(X11_FOUND) + list(APPEND CVD_FFMPEG_LIBRARIES ${X11_LIBRARIES}) + endif() + if(X11_Xv_FOUND) + list(APPEND CVD_FFMPEG_LIBRARIES ${X11_Xv_LIB}) + endif() + if(X11_Xext_FOUND) + list(APPEND CVD_FFMPEG_LIBRARIES ${X11_Xext_LIB}) + endif() + if(X11_Xau_FOUND) + list(APPEND CVD_FFMPEG_LIBRARIES ${X11_Xau_LIB}) + endif() + if(X11_Xdmcp_FOUND) + list(APPEND CVD_FFMPEG_LIBRARIES ${X11_Xdmcp_LIB}) + endif() +else() + message(STATUS "FFMPEG - not found") +endif() + + + diff --git a/cmake/CVDFindTooN.cmake b/cmake/CVDFindTooN.cmake new file mode 100644 index 00000000..c4f01e47 --- /dev/null +++ b/cmake/CVDFindTooN.cmake @@ -0,0 +1,25 @@ +#.rst: +# CVDFindTooN +# ----------- +# +# Find the native TooN includes. +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This module defines the following variables: +# +# :: +# +# CVD_TooN_INCLUDE_DIRS - where to find the TooN includes. +# CVD_TooN_FOUND - True if TooN found. + +find_path(CVD_TooN_INCLUDE_DIR NAMES TooN/TooN.h PATH_SUFFIXES include) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(CVD_TooN REQUIRED_VARS CVD_TooN_INCLUDE_DIR) + +if(CVD_TooN_FOUND) + set(CVD_TooN_INCLUDE_DIRS ${CVD_TooN_INCLUDE_DIR}) +endif() + +mark_as_advanced(CVD_TooN_INCLUDE_DIR ) diff --git a/cmake/CVDFinddc1394v2.cmake b/cmake/CVDFinddc1394v2.cmake new file mode 100644 index 00000000..9f52993f --- /dev/null +++ b/cmake/CVDFinddc1394v2.cmake @@ -0,0 +1,20 @@ +# This module defines the following variables: +# +# :: +# +# CVD_dc1394v2_INCLUDE_DIRS - where to find the dc1394v2 includes. +# CVD_dc1394v2_LIBRARIES - where to find the dc1394v2 libraries. +# CVD_dc1394v2_FOUND - True if dc1394v2 found. + +find_path(CVD_dc1394_INCLUDE_DIR NAMES dc1394/control.h PATH_SUFFIXES include) + +find_library(CVD_dc1394_LIBRARY NAMES dc1394 PATH_SUFFIXES lib) +find_library(CVD_raw1394_LIBRARY NAMES raw1394 PATH_SUFFIXES lib) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(CVD_dc1394v2 REQUIRED_VARS CVD_dc1394_INCLUDE_DIR CVD_dc1394_LIBRARY CVD_raw1394_LIBRARY) + +if(CVD_dc1394v2_FOUND) + set(CVD_dc1394v2_INCLUDE_DIRS ${CVD_dc1394_INCLUDE_DIR}) + set(CVD_dc1394v2_LIBRARIES ${CVD_dc1394_LIBRARY} ${CVD_raw1394_LIBRARY}) +endif() + +mark_as_advanced(CVD_dc1394_INCLUDE_DIR CVD_dc1394_LIBRARY CVD_raw1394_LIBRARY) diff --git a/cmake/FindTooN.cmake b/cmake/FindTooN.cmake deleted file mode 100644 index 57d946b3..00000000 --- a/cmake/FindTooN.cmake +++ /dev/null @@ -1,25 +0,0 @@ -#.rst: -# FindTooN -# -------- -# -# Find the native TooN includes. -# -# Result Variables -# ^^^^^^^^^^^^^^^^ -# -# This module defines the following variables: -# -# :: -# -# TooN_INCLUDE_DIRS - where to find the TooN includes. -# TooN_FOUND - True if TooN found. - -find_path(TooN_INCLUDE_DIR NAMES TooN/TooN.h PATH_SUFFIXES include) - -FIND_PACKAGE_HANDLE_STANDARD_ARGS(TooN REQUIRED_VARS TooN_INCLUDE_DIR) - -if(TooN_FOUND) - set(TooN_INCLUDE_DIRS ${TooN_INCLUDE_DIR}) -endif() - -mark_as_advanced(TooN_INCLUDE_DIR ) diff --git a/cmake/Finddc1394v2.cmake b/cmake/Finddc1394v2.cmake deleted file mode 100644 index faa017c7..00000000 --- a/cmake/Finddc1394v2.cmake +++ /dev/null @@ -1,29 +0,0 @@ -#.rst: -# Finddc1394v2 -# -------- -# -# Find the native dc1394 v2 includes. -# -# Result Variables -# ^^^^^^^^^^^^^^^^ -# -# This module defines the following variables: -# -# :: -# -# dc1394v2_INCLUDE_DIRS - where to find the dc1394v2 includes. -# dc1394v2_LIBRARIES - where to find the dc1394v2 libraries. -# dc1394v2_FOUND - True if dc1394v2 found. - -find_path(dc1394_INCLUDE_DIR NAMES dc1394/control.h PATH_SUFFIXES include) - -find_library(dc1394_LIBRARY NAMES dc1394 PATH_SUFFIXES lib) -find_library(raw1394_LIBRARY NAMES raw1394 PATH_SUFFIXES lib) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(dc1394v2 REQUIRED_VARS dc1394_INCLUDE_DIR dc1394_LIBRARY raw1394_LIBRARY) - -if(dc1394v2_FOUND) - set(dc1394v2_INCLUDE_DIRS ${dc1394_INCLUDE_DIR}) - set(dc1394v2_LIBRARIES ${dc1394_LIBRARY} ${raw1394_LIBRARY}) -endif() - -mark_as_advanced(dc1394_INCLUDE_DIR dc1394_LIBRARY raw1394_LIBRARY) From 3197c647b3ef1411115ddc3431039cec72bd8e7e Mon Sep 17 00:00:00 2001 From: Edward Rosten Date: Thu, 15 Aug 2019 13:31:49 +0100 Subject: [PATCH 2/4] Actually check in files this time --- CMakeLists.txt | 2 +- cmake/CVDConfig.cmake | 2 +- cmake/CVDFindAllDeps.cmake | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0418ac36..eed97059 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ include(CheckSymbolExists) set(CMAKE_DEBUG_POSTFIX _debug) # Dependencies that can be automatically found by CMake. -include(CVDFindDepsAll) +include(cmake/CVDFindAllDeps.cmake) # Detect endianness diff --git a/cmake/CVDConfig.cmake b/cmake/CVDConfig.cmake index 024e3392..b0f15b55 100644 --- a/cmake/CVDConfig.cmake +++ b/cmake/CVDConfig.cmake @@ -16,7 +16,7 @@ # CVD_FOUND - True if CVD found. -include(CVDFindDepsAll) +include(CVDFindAllDeps.cmake) find_path(CVD_INCLUDE_DIR NAMES cvd/config.h PATH_SUFFIXES include) diff --git a/cmake/CVDFindAllDeps.cmake b/cmake/CVDFindAllDeps.cmake index 41181bb2..66a1b12c 100644 --- a/cmake/CVDFindAllDeps.cmake +++ b/cmake/CVDFindAllDeps.cmake @@ -5,9 +5,9 @@ find_package(X11) find_package(OpenGL) find_package(Threads REQUIRED) -include(CVDFindFFMPEG) -include(CVDFindTooN) -include(CVDFinddc1394v2) +include(${CMAKE_CURRENT_LIST_DIR}/CVDFindFFMPEG.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/CVDFindTooN.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/CVDFinddc1394v2.cmake) SET(CVD_DEP_INCLUDES_PUBLIC) SET(CVD_DEP_INCLUDES_PRIVATE) From dd61b8493de3906e93d981ed05fbd6cd7c9425f3 Mon Sep 17 00:00:00 2001 From: Edward Rosten Date: Thu, 15 Aug 2019 13:39:02 +0100 Subject: [PATCH 3/4] Install all cmake files --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eed97059..07cf7a2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -312,7 +312,7 @@ foreach(file ${HEADERS}) install(FILES ${file} DESTINATION include/${dir}) endforeach() install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/cvd DESTINATION include) -install(FILES ${PROJECT_SOURCE_DIR}/cmake/CVDConfig.cmake DESTINATION cmake) +install(DIRECTORY ${PROJECT_SOURCE_DIR}/cmake DESTINATION . FILES MATCHING PATTERN *.cmake) if(CVD_ENABLE_TESTS) add_subdirectory(tests) From 649d08c4b50416df07747d206cdc90e2cca77188 Mon Sep 17 00:00:00 2001 From: Edward Rosten Date: Thu, 15 Aug 2019 13:41:59 +0100 Subject: [PATCH 4/4] haha --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 07cf7a2d..7a24ee19 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -312,7 +312,7 @@ foreach(file ${HEADERS}) install(FILES ${file} DESTINATION include/${dir}) endforeach() install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/cvd DESTINATION include) -install(DIRECTORY ${PROJECT_SOURCE_DIR}/cmake DESTINATION . FILES MATCHING PATTERN *.cmake) +install(DIRECTORY ${PROJECT_SOURCE_DIR}/cmake DESTINATION . FILES_MATCHING PATTERN *.cmake) if(CVD_ENABLE_TESTS) add_subdirectory(tests)