Commit a40f402e authored by Michael Reeves's avatar Michael Reeves

cmake 3.1, c++11 for master

parent 68d4f469
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)#prior versions have no sane way of checking C++11 features and needed flags
project(kdiff3)
set(CMAKE_CXX_EXTENSIONS OFF ) #don't use non-standard extentions
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(ECM_MIN_VERSION "1.0.0")
set(QT_MIN_VERSION "5.3.0")
......@@ -27,6 +28,10 @@ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/mod
SET(KDiff3_LIBRARIES ${Qt5PrintSupport_LIBRARIES} KF5::I18n KF5::CoreAddons KF5::IconThemes)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CLANG_WARNING_FLAGS}")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CLANG_WARNING_FLAGS}")
set(needed_features
cxx_generalized_initializers
cxx_constexpr
cxx_auto_type)
add_definitions(${QT_DEFINITIONS} ${KF5_DEFINITIONS})
#remove unnneeded errors
......
......@@ -8,8 +8,7 @@ Now requires Qt 5.3 or later and KF5 5.5+. Legacy 0.9.98 and earlier builds are
Windows/MacOSX build is untested since port. Builds and runs under kubuntu 16.04 will likely
still work under other Linux/Un*x. The Konqueror specific plugin is not ported and no longer mantained.
This plugin would only apply to KDE before 4.6. Support as been removed from main CMakeLists.txt.
As of 1/13/17 cmake 3.1+ is the targeted cmake version. cmake 2.8.12 and 3.0.x should work but will be
given best effort support.
As of 1/13/17 cmake 3.1+ is the targeted cmake version.
These are the original pre kf5/qt5 Readme fallows:
......
......@@ -24,7 +24,7 @@ set(kdiff3part_PART_SRCS
add_library(kdiff3part MODULE ${kdiff3part_PART_SRCS})
set_target_properties(kdiff3part PROPERTIES DEFINE_SYMBOL KDIFF3_PART)
target_compile_features(kdiff3part PRIVATE ${needed_features})
target_link_libraries(kdiff3part ${KDiff3_LIBRARIES} KF5::Parts ${QT_QT3SUPPORT_LIBRARY})
install(TARGETS kdiff3part DESTINATION ${PLUGIN_INSTALL_DIR}/kf5/parts )
......@@ -41,6 +41,7 @@ set(kdiff3_SRCS
add_executable(kdiff3 ${kdiff3_SRCS})
target_link_libraries(kdiff3 KF5::ConfigCore KF5::ConfigGui KF5::Parts ${QT_QT3SUPPORT_LIBRARY} ${KDiff3_LIBRARIES} )
target_compile_features(kdiff3 PRIVATE ${needed_features})
install(TARGETS kdiff3 ${INSTALL_TARGETS_DEFAULT_ARGS})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment