Major changes in the cmake code. Start using more advanced cmake functions and avoid using the ones from other projects. Still some cleaning to do
This commit is contained in:
1 parent
5854713a78
commit
89cda413cc
13 files changed
+290
-407
No files matched your search
+15
-6
@@ -4,10 +4,6 @@
|
||||
|
||||
INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||
|
||||
ADD_OPTION(USE_OPENCV "Add OpenCV support" OFF )
|
||||
ADD_OPTION(USE_FFMPEG "Add FFMPEG support" OFF )
|
||||
ADD_OPTION(USE_PIXFC "Add PIXFC support" OFF )
|
||||
|
||||
set(plaYUver_Lib_SRCS
|
||||
# Frame
|
||||
PlaYUVerFrame.cpp
|
||||
@@ -16,17 +12,30 @@ set(plaYUver_Lib_SRCS
|
||||
PlaYUVerStream.cpp
|
||||
)
|
||||
|
||||
IF( USE_FFMPEG )
|
||||
LIST( APPEND plaYUver_Lib_SRCS LibAvContextHandle.cpp )
|
||||
ENDIF()
|
||||
|
||||
set(plaYUver_Lib_HEADERS
|
||||
PlaYUVerFrame.h
|
||||
PlaYUVerStream.h
|
||||
)
|
||||
|
||||
INCLUDE( LibPixfc.cmake )
|
||||
# OPTION( USE_PIXFC "Add PIXFC support" OFF )
|
||||
# IF( USE_PIXFC )
|
||||
# IF(EXISTS "${EXTERNAL_SRC}/pixfc-sse/build/src/libpixfc-sse.a")
|
||||
# INCLUDE_DIRECTORIES( ${EXTERNAL_SRC}/pixfc-sse/include )
|
||||
# LIST(APPEND LINKER_LIBS ${EXTERNAL_SRC}/pixfc-sse/build/src/libpixfc-sse.a )
|
||||
# LIST(APPEND LINKER_LIBS rt)
|
||||
# ELSE()
|
||||
# SET( USE_PIXFC OFF )
|
||||
# ENDIF()
|
||||
# ENDIF()
|
||||
|
||||
CONFIGURE_FILE( PlaYUVerConfig.cmake.in ${CMAKE_BINARY_DIR}/PlaYUVerConfig.cmake @ONLY)
|
||||
|
||||
ADD_LIBRARY( PlaYUVerLib ${plaYUver_Lib_SRCS} )
|
||||
TARGET_LINK_LIBRARIES( PlaYUVerLib ${LINKER_LIBS} )
|
||||
TARGET_LINK_LIBRARIES( PlaYUVerLib ${FFMPEG_LIBRARIES} ${OpenCV_LIBRARIES} )
|
||||
|
||||
INSTALL(FILES ${plaYUver_Lib_HEADERS} DESTINATION include )
|
||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libPlaYUVerLib.a DESTINATION lib )
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
#include <cstdio>
|
||||
#include "LibAvContextHandle.h"
|
||||
#include "lib/PlaYUVerFrame.h"
|
||||
#include "lib/PlaYUVerFramePixelFormats.h"
|
||||
#include "PlaYUVerFrame.h"
|
||||
#include "PlaYUVerFramePixelFormats.h"
|
||||
#include "LibMemory.h"
|
||||
|
||||
namespace plaYUVer
|
||||
@@ -44,7 +44,7 @@ extern "C"
|
||||
#include <libavformat/avformat.h>
|
||||
}
|
||||
|
||||
#include "lib/PlaYUVerDefs.h"
|
||||
#include "PlaYUVerDefs.h"
|
||||
|
||||
namespace plaYUVer
|
||||
{
|
||||
@@ -1,16 +0,0 @@
|
||||
#####################################################################################
|
||||
# Pixfc-sse library cmake file
|
||||
######################################################################################
|
||||
# https://code.google.com/p/pixfc-sse/
|
||||
# svn checkout http://pixfc-sse.googlecode.com/svn/trunk/ pixfc-sse
|
||||
# Add to folder external
|
||||
|
||||
IF( USE_PIXFC )
|
||||
IF(EXISTS "${EXTERNAL_SRC}/pixfc-sse/build/src/libpixfc-sse.a")
|
||||
INCLUDE_DIRECTORIES( ${EXTERNAL_SRC}/pixfc-sse/include )
|
||||
LIST(APPEND LINKER_LIBS ${EXTERNAL_SRC}/pixfc-sse/build/src/libpixfc-sse.a )
|
||||
LIST(APPEND LINKER_LIBS rt)
|
||||
ELSE()
|
||||
SET( USE_PIXFC OFF )
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
Reference in new issue
Block a user