Various compilation scripts & patches for Linux programs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.5 KiB

7 years ago
  1. --- a/CMakeLists.txt
  2. +++ b/CMakeLists.txt
  3. @@ -36,12 +36,16 @@
  4. ENDIF(WIN32)
  5. FIND_PACKAGE( OpenCV REQUIRED core highgui imgproc )
  6. -FIND_PACKAGE(Qt4 REQUIRED)
  7. -FIND_PACKAGE(GIF REQUIRED)
  8. +FIND_PACKAGE(Qt5Core REQUIRED)
  9. +
  10. +FIND_LIBRARY(GIF REQUIRED)
  11. +#FIND_LIBRARY(GIF 4 EXACT REQUIRED HINTS /usr/lib/giflib4)
  12. -INCLUDE(${QT_USE_FILE})
  13. ADD_DEFINITIONS(${QT_DEFINITIONS})
  14. +FIND_PACKAGE(Qt5Widgets)
  15. +INCLUDE_DIRECTORIES(${Qt5Widgets_INCLUDE_DIRS})
  16. +
  17. SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -Wno-reorder -Wno-sign-compare" )
  18. SET(WINDOWS_EXEC )
  19. @@ -143,9 +147,9 @@
  20. ui/interpolationdialog.ui
  21. )
  22. -QT4_WRAP_CPP(HEADERS_MOC ${QT_HEADERS})
  23. -QT4_WRAP_UI(FORMS_HEADERS ${FORMS})
  24. -QT4_ADD_RESOURCES(RESOURCES_RCC ${RESOURCES})
  25. +qt5_wrap_cpp(HEADERS_MOC ${QT_HEADERS})
  26. +qt5_wrap_ui(FORMS_HEADERS ${FORMS})
  27. +qt5_add_resources(RESOURCES_RCC ${RESOURCES})
  28. IF(WIN32)
  29. SET( OPENCV_LIBS "-lopencv_core244 -lopencv_highgui244 -lopencv_imgproc244" )
  30. @@ -154,6 +158,7 @@
  31. ENDIF(WIN32)
  32. SET( GIF_LIBS "-lgif" )
  33. +#SET( GIF_LIBS /usr/lib/giflib4/libgif.so "-lgif" )
  34. set(RES_FILES "")
  35. if(MINGW)
  36. @@ -165,7 +170,8 @@
  37. endif(MINGW)
  38. ADD_EXECUTABLE(${TARGET_NAME} ${WINDOWS_EXEC} ${SOURCES} ${HEADERS_MOC} ${FORMS_HEADERS} ${RESOURCES_RCC} ${RES_FILES})
  39. -TARGET_LINK_LIBRARIES(${TARGET_NAME} ${QT_LIBRARIES} ${OPENCV_LIBS} ${GIF_LIBS})
  40. +TARGET_LINK_LIBRARIES(${TARGET_NAME} ${OPENCV_LIBS} ${GIF_LIBS})
  41. +TARGET_LINK_LIBRARIES(${TARGET_NAME} Qt5::Widgets)
  42. IF(UNIX)
  43. INSTALL(TARGETS ${TARGET_NAME} DESTINATION ${BIN_INSTALL_DIR})