From 3a02de7641620e77b90cddfc295a1541aea8d1e6 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Mon, 31 Mar 2014 16:08:18 +0100 Subject: [PATCH] Changes in some cmake files and add a new lib --- CMakeLists.txt | 7 ++++--- cmake/LibPixfc.cmake | 8 ++++++++ cmake/LibQT.cmake | 5 ++--- 3 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 cmake/LibPixfc.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index c4d05ff..e81a645 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,7 @@ ADD_OPTION(CMAKE_BUILD_TYPE "Build type" "Debug" ) ADD_OPTION(USE_WERROR "Warnings as errors" OFF ) ADD_OPTION(USE_QT4 "Build with QT4" OFF ) ADD_OPTION(USE_OPENCV "Add OpenCV support" OFF ) +ADD_OPTION(USE_PIXFC "Add PIXFC support" OFF ) ADD_OPTION(USE_FFMPEG "Add FFMPEG support" OFF ) ###################################################################################### @@ -53,10 +54,10 @@ IF( USE_OPENCV ) IF( NOT OpenCV_FOUND) SET(USE_OPENCV FALSE) ELSE() - SET( LINKER_LIBS ${LINKER_LIBS} ${OpenCV_LIBRARIES} ) + LIST(APPEND LINKER_LIBS ${OpenCV_LIBRARIES} ) ENDIF() ENDIF() - +INCLUDE( cmake/LibPixfc.cmake ) INCLUDE( cmake/LibFFmpeg.cmake ) ###################################################################################### @@ -75,7 +76,7 @@ CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_D ###################################################################################### # Target App ###################################################################################### -SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" ) +SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g" ) IF( USE_WERROR ) SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" ) ENDIF() diff --git a/cmake/LibPixfc.cmake b/cmake/LibPixfc.cmake new file mode 100644 index 0000000..44feb16 --- /dev/null +++ b/cmake/LibPixfc.cmake @@ -0,0 +1,8 @@ +##################################################################################### +# Qt library cmake file +###################################################################################### + +IF( USE_PIXFC ) + LIST(APPEND LINKER_LIBS pixfc-sse) + LIST(APPEND LINKER_LIBS rt) +ENDIF() \ No newline at end of file diff --git a/cmake/LibQT.cmake b/cmake/LibQT.cmake index 73b6c8d..c323c2e 100644 --- a/cmake/LibQT.cmake +++ b/cmake/LibQT.cmake @@ -13,7 +13,7 @@ IF( USE_QT4 ) QT4_WRAP_UI( FORMS_HEADERS_FILES ${FORMS_FILES} ) QT4_ADD_RESOURCES( RESOURCES_RCC_FILES ${RESOURCES_FILES} ) - SET( LINKER_LIBS ${LINKER_LIBS} ${QT_LIBRARIES} ) + LIST(APPEND LINKER_LIBS ${QT_LIBRARIES} ) ENDIF() IF( NOT USE_QT4 ) @@ -29,7 +29,6 @@ IF( NOT USE_QT4 ) # Add compiler flags for building executables (-fPIE) SET( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS} ) - SET( LINKER_LIBS ${LINKER_LIBS} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ) - + LIST(APPEND LINKER_LIBS ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ) SET( CURR_QT_MODULES Core Gui Widgets ) ENDIF()