diff --git a/CMakeLists.txt b/CMakeLists.txt index 4123e4ad..456c1df6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ # limitations under the License. # -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.1) project(ZNC VERSION 1.7.0) set(ZNC_VERSION 1.7.x) set(append_git_version true) @@ -332,6 +332,4 @@ message("") # TODO # ==== # -# readme: advice about cmake --system-information # remove old configure.ac and Makefile.in -# consider mininum cmake version diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 816b28c2..5f86b06b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -14,6 +14,11 @@ # limitations under the License. # +if(CMAKE_VERSION VERSION_LESS 3.2) + # Since 3.2 it does this automatically from BYPRODUCTS + set_source_files_properties("versionc.cpp" PROPERTIES GENERATED true) +endif() + znc_add_library(znclib ${lib_type} "ZNCString.cpp" "znc.cpp" "IRCNetwork.cpp" "IRCSock.cpp" "Client.cpp" "Chan.cpp" "Nick.cpp" "Server.cpp" "Modules.cpp" "MD5.cpp" "Buffer.cpp" "Utils.cpp" "FileUtils.cpp" diff --git a/znc-buildmod.cmake.in b/znc-buildmod.cmake.in index dd519f71..f3dbe8d5 100755 --- a/znc-buildmod.cmake.in +++ b/znc-buildmod.cmake.in @@ -56,7 +56,7 @@ args = parser.parse_args() with tempfile.TemporaryDirectory() as cmdir: with open(os.path.join(cmdir, 'CMakeLists.txt'), 'w') as cm: - print('cmake_minimum_required(VERSION 3.0)', file=cm) + print('cmake_minimum_required(VERSION 3.1)', file=cm) print('project(ExternalModules)', file=cm) print('find_package(ZNC @ZNC_VERSION_MAJOR@.@ZNC_VERSION_MINOR@ PATHS ' '@CMAKE_INSTALL_FULL_DATADIR@/znc)', file=cm)