Ticket #54448: patch-build-for-MP.diff

File patch-build-for-MP.diff, 3.2 KB (added by RJVB (René Bertin), 7 years ago)
  • CMakeLists.txt

    old new  
    1 project("DB Browser for SQLite")
     1project("sqlitebrowser")
    22cmake_minimum_required(VERSION 2.8.7)
    33
    44set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
     
    1010    set(CMAKE_BUILD_TYPE "Release")
    1111endif()
    1212
     13include(FeatureSummary)
     14
    1315if(WIN32 AND MSVC)
    1416        if(CMAKE_CL_64)
    1517                # Paths for 64-bit windows builds
     
    4749
    4850set(QHEXEDIT_DIR libs/qhexedit)
    4951set(QCUSTOMPLOT_DIR libs/qcustomplot-source)
    50 set(QSCINTILLA_DIR libs/qscintilla/Qt4Qt5)
     52# set(QSCINTILLA_DIR libs/qscintilla/Qt4Qt5)
    5153
    5254if(NOT ANTLR2_FOUND)
    5355    set(ANTLR_DIR libs/antlr-2.7.7)
     
    5557endif()
    5658add_subdirectory(${QHEXEDIT_DIR})
    5759add_subdirectory(${QCUSTOMPLOT_DIR})
    58 add_subdirectory(${QSCINTILLA_DIR})
     60# add_subdirectory(${QSCINTILLA_DIR})
    5961
    6062if(USE_QT5)
    6163        find_package(Qt5Widgets REQUIRED)
     
    258260                "${CMAKE_CURRENT_BINARY_DIR}"
    259261                ${QHEXEDIT_DIR}
    260262                ${QCUSTOMPLOT_DIR}
    261                 ${QSCINTILLA_DIR}
     263                ${QSCINTILLA_INCLUDE_DIR}
    262264                ${ADDITIONAL_INCLUDE_PATHS}
    263265                src)
    264266if(ANTLR2_FOUND)
     
    279281    qt5_use_modules(${PROJECT_NAME} Gui Widgets Network Test PrintSupport)
    280282    set(QT_LIBRARIES "")
    281283endif()
    282 add_dependencies(${PROJECT_NAME} qhexedit qcustomplot qscintilla2)
     284# add_dependencies(${PROJECT_NAME} qhexedit qcustomplot qscintilla2)
     285add_dependencies(${PROJECT_NAME} qhexedit qcustomplot)
    283286if(NOT ANTLR2_FOUND)
    284287    add_dependencies(${PROJECT_NAME} antlr)
    285288endif()
     
    287290link_directories(
    288291                "${CMAKE_CURRENT_BINARY_DIR}/${ANTLR_DIR}"
    289292                "${CMAKE_CURRENT_BINARY_DIR}/${QHEXEDIT_DIR}"
    290                 "${CMAKE_CURRENT_BINARY_DIR}/${QCUSTOMPLOT_DIR}"
    291                 "${CMAKE_CURRENT_BINARY_DIR}/${QSCINTILLA_DIR}")
     293                "${CMAKE_CURRENT_BINARY_DIR}/${QCUSTOMPLOT_DIR}")
    292294if(NOT ANTLR2_FOUND)
    293295    link_directories("${CMAKE_CURRENT_BINARY_DIR}/${ANTLR_DIR}")
    294296endif()
     
    296298target_link_libraries(${PROJECT_NAME}
    297299                qhexedit
    298300                qcustomplot
    299                 qscintilla2
     301                "-L${QSCINTILLA_LIB_DIR} -lqscintilla2_qt5"
    300302                ${QT_LIBRARIES}
    301303                ${WIN32_STATIC_LINK}
    302304                ${LIBSQLITE}
     
    326328        add_subdirectory(src/tests)
    327329endif()
    328330
    329 if(UNIX AND NOT APPLE)
     331if(UNIX)
    330332        install(FILES src/icons/${PROJECT_NAME}.png
    331333                DESTINATION share/icons/hicolor/256x256/apps/)
    332334       
     
    335337
    336338        install(FILES distri/${PROJECT_NAME}.desktop.appdata.xml
    337339                DESTINATION share/appdata/)
    338 endif(UNIX AND NOT APPLE)
     340endif(UNIX)
    339341
    340342if(WIN32 AND MSVC)
    341343        install(TARGETS ${PROJECT_NAME}
     
    405407               ExecWait '\\\"$INSTDIR\\\\redist\\\\${VSREDIST}\\\" /install /passive /quiet'
    406408               Delete '\\\"$INSTDIR\\\\redist\\\\${VSREDIST}\\\"'
    407409               ")
    408 else(WIN32 AND NOT UNIX)
    409         set(CPACK_STRIP_FILES "bin/DB Browser for SQLite")
    410         set(CPACK_SOURCE_STRIP_FILES "")
     410# else(WIN32 AND NOT UNIX)
     411#       set(CPACK_STRIP_FILES "bin/DB Browser for SQLite")
     412#       set(CPACK_SOURCE_STRIP_FILES "")
    411413endif(WIN32 AND NOT UNIX)
    412 set(CPACK_PACKAGE_EXECUTABLES "DB Browser for SQLite" "DB Browser for SQLite")
     414set(CPACK_PACKAGE_EXECUTABLES "SQLiteBrowser" "DB Browser for SQLite")
    413415include(CPack)
     416
     417feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
     418