-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from edrosten/er/cmake-config
Er/cmake config
- Loading branch information
Showing
8 changed files
with
184 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
find_package(JPEG) | ||
find_package(PNG) | ||
find_package(TIFF) | ||
find_package(X11) | ||
find_package(OpenGL) | ||
find_package(Threads REQUIRED) | ||
|
||
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) | ||
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() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.