Add pre-commit checks and reformat code
This commit is contained in:
9 files changed
+121
-67
No files matched your search
+14
-7
@@ -53,19 +53,23 @@ MACRO(find_component _component _pkgconfig _library _header)
|
||||
FIND_PATH(
|
||||
${_component}_INCLUDE_DIRS ${_header}
|
||||
HINTS ${PC_LIB${_component}_INCLUDEDIR} ${PC_LIB${_component}_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES ffmpeg)
|
||||
PATH_SUFFIXES ffmpeg
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
${_component}_LIBRARIES
|
||||
NAMES ${_library}
|
||||
HINTS ${PC_LIB${_component}_LIBDIR} ${PC_LIB${_component}_LIBRARY_DIRS})
|
||||
HINTS ${PC_LIB${_component}_LIBDIR} ${PC_LIB${_component}_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
SET(${_component}_DEFINITIONS
|
||||
${PC_${_component}_CFLAGS_OTHER}
|
||||
CACHE STRING "The ${_component} CFLAGS.")
|
||||
CACHE STRING "The ${_component} CFLAGS."
|
||||
)
|
||||
SET(${_component}_VERSION
|
||||
${PC_${_component}_VERSION}
|
||||
CACHE STRING "The ${_component} version number.")
|
||||
CACHE STRING "The ${_component} version number."
|
||||
)
|
||||
|
||||
SET_COMPONENT_FOUND(${_component})
|
||||
|
||||
@@ -104,13 +108,16 @@ IF(NOT FFMPEG_LIBRARIES)
|
||||
# cache the vars.
|
||||
SET(FFMPEG_INCLUDE_DIRS
|
||||
${FFMPEG_INCLUDE_DIRS}
|
||||
CACHE STRING "The FFmpeg include directories." FORCE)
|
||||
CACHE STRING "The FFmpeg include directories." FORCE
|
||||
)
|
||||
SET(FFMPEG_LIBRARIES
|
||||
${FFMPEG_LIBRARIES}
|
||||
CACHE STRING "The FFmpeg libraries." FORCE)
|
||||
CACHE STRING "The FFmpeg libraries." FORCE
|
||||
)
|
||||
SET(FFMPEG_DEFINITIONS
|
||||
${FFMPEG_DEFINITIONS}
|
||||
CACHE STRING "The FFmpeg cflags." FORCE)
|
||||
CACHE STRING "The FFmpeg cflags." FORCE
|
||||
)
|
||||
|
||||
MARK_AS_ADVANCED(FFMPEG_INCLUDE_DIRS FFMPEG_LIBRARIES FFMPEG_DEFINITIONS)
|
||||
|
||||
|
||||
@@ -9,13 +9,16 @@ MACRO(ADD_MODULE name file)
|
||||
LIST(APPEND MODULES_LIST_FILES ${file})
|
||||
SET(Calyp_Mod_SRCS
|
||||
"${Calyp_Mod_SRCS}"
|
||||
PARENT_SCOPE)
|
||||
PARENT_SCOPE
|
||||
)
|
||||
SET(MODULES_LIST_NAME
|
||||
"${MODULES_LIST_NAME}"
|
||||
PARENT_SCOPE)
|
||||
PARENT_SCOPE
|
||||
)
|
||||
SET(MODULES_LIST_FILES
|
||||
"${MODULES_LIST_FILES}"
|
||||
PARENT_SCOPE)
|
||||
PARENT_SCOPE
|
||||
)
|
||||
ENDIF()
|
||||
UNSET(__modulename)
|
||||
ENDMACRO()
|
||||
@@ -50,7 +53,8 @@ ENDMACRO()
|
||||
# Create header
|
||||
MACRO(CREATE_MODULE_MACROS)
|
||||
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "// This files add the header files of each module\n"
|
||||
"#ifndef __MODULESLISTHEADER_H__\n#define __MODULESLISTHEADER_H__\n")
|
||||
"#ifndef __MODULESLISTHEADER_H__\n#define __MODULESLISTHEADER_H__\n"
|
||||
)
|
||||
FOREACH(module ${MODULES_LIST_FILES})
|
||||
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "#include \"${module}.h\"\n")
|
||||
ENDFOREACH(module ${MODULES_LIST_FILES})
|
||||
|
||||
+16
-8
@@ -11,23 +11,28 @@ ENDFOREACH(OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES)
|
||||
|
||||
SET(MSVC_DLL_DIR
|
||||
"MSVC_DLL_DIR"
|
||||
CACHE PATH "Where to find MSVC dlls")
|
||||
CACHE PATH "Where to find MSVC dlls"
|
||||
)
|
||||
# INSTALL(FILES ${MSVC_DLL_DIR}/msvcr120.dll DESTINATION bin ) INSTALL(FILES ${MSVC_DLL_DIR}/msvcp120.dll DESTINATION bin )
|
||||
|
||||
SET(QT_DIR
|
||||
"QT-Dir"
|
||||
CACHE PATH "Where to find QT Lib on Windows")
|
||||
CACHE PATH "Where to find QT Lib on Windows"
|
||||
)
|
||||
SET(QT_ICU_VERSION
|
||||
""
|
||||
CACHE STRING "Qt ICU version of dll's")
|
||||
CACHE STRING "Qt ICU version of dll's"
|
||||
)
|
||||
SET(QT_DLL_POSTFIX
|
||||
""
|
||||
CACHE STRING "Postfix to dll's name for debug")
|
||||
CACHE STRING "Postfix to dll's name for debug"
|
||||
)
|
||||
SET(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH} ${QT_DIR}")
|
||||
|
||||
SET(WINDLLIB
|
||||
"Dl-location"
|
||||
CACHE PATH "Where to find DL Lib on Windows")
|
||||
CACHE PATH "Where to find DL Lib on Windows"
|
||||
)
|
||||
|
||||
IF(NOT USE_QT4)
|
||||
INSTALL(FILES ${QT_DIR}/bin/Qt5Core${QT_DLL_POSTFIX}.dll DESTINATION bin)
|
||||
@@ -56,10 +61,12 @@ ENDIF()
|
||||
IF(USE_OPENCV)
|
||||
SET(OpenCV_DLL_DIR
|
||||
"${OpenCV_DIR}/bin"
|
||||
CACHE PATH "Where to find OpenCV dlls")
|
||||
CACHE PATH "Where to find OpenCV dlls"
|
||||
)
|
||||
SET(OpenCV_INSTALL_MODULES
|
||||
${OPENCV_MODULES}
|
||||
CACHE STRING "List of OpenCV modules")
|
||||
CACHE STRING "List of OpenCV modules"
|
||||
)
|
||||
FOREACH(opencv_module IN LISTS OpenCV_INSTALL_MODULES)
|
||||
INSTALL(FILES ${OpenCV_DLL_DIR}/opencv_${opencv_module}${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}.dll DESTINATION bin)
|
||||
ENDFOREACH()
|
||||
@@ -68,7 +75,8 @@ ENDIF()
|
||||
IF(USE_FFMPEG)
|
||||
SET(FFMPEG_DIR
|
||||
"FFmpeg-Dir"
|
||||
CACHE PATH "Where to find FFmpeg Lib on Windows")
|
||||
CACHE PATH "Where to find FFmpeg Lib on Windows"
|
||||
)
|
||||
INSTALL(FILES ${FFMPEG_DIR}/bin/avcodec-${AVCODEC_VERSION}.dll DESTINATION bin)
|
||||
INSTALL(FILES ${FFMPEG_DIR}/bin/avformat-${AVFORMAT_VERSION}.dll DESTINATION bin)
|
||||
INSTALL(FILES ${FFMPEG_DIR}/bin/avutil-${AVUTIL_VERSION}.dll DESTINATION bin)
|
||||
|
||||
Reference in new issue
Block a user