|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -36,12 +36,16 @@
|
|
ENDIF(WIN32)
|
|
|
|
FIND_PACKAGE( OpenCV REQUIRED core highgui imgproc )
|
|
-FIND_PACKAGE(Qt4 REQUIRED)
|
|
-FIND_PACKAGE(GIF REQUIRED)
|
|
+FIND_PACKAGE(Qt5Core REQUIRED)
|
|
+
|
|
+FIND_LIBRARY(GIF REQUIRED)
|
|
+#FIND_LIBRARY(GIF 4 EXACT REQUIRED HINTS /usr/lib/giflib4)
|
|
|
|
-INCLUDE(${QT_USE_FILE})
|
|
ADD_DEFINITIONS(${QT_DEFINITIONS})
|
|
|
|
+FIND_PACKAGE(Qt5Widgets)
|
|
+INCLUDE_DIRECTORIES(${Qt5Widgets_INCLUDE_DIRS})
|
|
+
|
|
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -Wno-reorder -Wno-sign-compare" )
|
|
|
|
SET(WINDOWS_EXEC )
|
|
@@ -143,9 +147,9 @@
|
|
ui/interpolationdialog.ui
|
|
)
|
|
|
|
-QT4_WRAP_CPP(HEADERS_MOC ${QT_HEADERS})
|
|
-QT4_WRAP_UI(FORMS_HEADERS ${FORMS})
|
|
-QT4_ADD_RESOURCES(RESOURCES_RCC ${RESOURCES})
|
|
+qt5_wrap_cpp(HEADERS_MOC ${QT_HEADERS})
|
|
+qt5_wrap_ui(FORMS_HEADERS ${FORMS})
|
|
+qt5_add_resources(RESOURCES_RCC ${RESOURCES})
|
|
|
|
IF(WIN32)
|
|
SET( OPENCV_LIBS "-lopencv_core244 -lopencv_highgui244 -lopencv_imgproc244" )
|
|
@@ -154,6 +158,7 @@
|
|
ENDIF(WIN32)
|
|
|
|
SET( GIF_LIBS "-lgif" )
|
|
+#SET( GIF_LIBS /usr/lib/giflib4/libgif.so "-lgif" )
|
|
|
|
set(RES_FILES "")
|
|
if(MINGW)
|
|
@@ -165,7 +170,8 @@
|
|
endif(MINGW)
|
|
|
|
ADD_EXECUTABLE(${TARGET_NAME} ${WINDOWS_EXEC} ${SOURCES} ${HEADERS_MOC} ${FORMS_HEADERS} ${RESOURCES_RCC} ${RES_FILES})
|
|
-TARGET_LINK_LIBRARIES(${TARGET_NAME} ${QT_LIBRARIES} ${OPENCV_LIBS} ${GIF_LIBS})
|
|
+TARGET_LINK_LIBRARIES(${TARGET_NAME} ${OPENCV_LIBS} ${GIF_LIBS})
|
|
+TARGET_LINK_LIBRARIES(${TARGET_NAME} Qt5::Widgets)
|
|
|
|
IF(UNIX)
|
|
INSTALL(TARGETS ${TARGET_NAME} DESTINATION ${BIN_INSTALL_DIR})
|