From 624f7780a155e38351cb45ade22fa23262713b9a Mon Sep 17 00:00:00 2001 From: Tom Collins Date: Fri, 26 Jun 2020 08:26:06 -0700 Subject: [PATCH] cmake: update minimum required version to 2.8.1 This is a reasonable requirement. It allows removal of two OLD policies and gives us consistent behavior for relative link directories. --- CMakeLists.txt | 17 ++++------------- README.markdown | 4 ++-- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e0e39be..5422b5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,19 +1,11 @@ ### ### CMake settings ### -## Due to Mac OSX we need to keep compatibility with CMake 2.6 -# see http://www.cmake.org/Wiki/CMake_Policies -cmake_minimum_required(VERSION 2.6) -# see http://www.cmake.org/cmake/help/cmake-2-8-docs.html#policy:CMP0012 -if(POLICY CMP0012) - cmake_policy(SET CMP0012 OLD) -endif() -# see http://www.cmake.org/cmake/help/cmake-2-8-docs.html#policy:CMP0015 -if(POLICY CMP0015) - cmake_policy(SET CMP0015 OLD) -endif() +# Version 2.8.1 was released 2010-03-16 and is a reasonable minimum. +cmake_minimum_required(VERSION 2.8.1) -# allow relative paths in LINK_DIRECTORIES +# allow relative paths in link_directories() +# see https://cmake.org/cmake/help/v3.18/policy/CMP0081.html if(POLICY CMP0081) cmake_policy(SET CMP0081 OLD) endif() @@ -162,7 +154,6 @@ if(MSVC) # c) Correct suffixes for static libraries if(NOT BUILD_SHARED_LIBS) - ### General stuff set(LIB_TARGET_SUFFIX "${LIB_SUFFIX}${LIB_RT_SUFFIX}") endif() endif() diff --git a/README.markdown b/README.markdown index 425c44d..ea94a1a 100644 --- a/README.markdown +++ b/README.markdown @@ -61,9 +61,9 @@ Make sure you have cmake installed for i686 (MinGW32) or x86_64 (MinGW64): `pacm cd libpinproc mkdir build; cd build cmake .. -A Win32 - # configure paths for td2xxx; use `cmake .. -L` to list configured options + # configure paths for ftd2xxx; use `cmake .. -L` to list configured options cmake .. -D EXTRA_INC="../ftd2xx" - cmake .. -D EXTRA_LINK="../../ftd2xx/i386" + cmake .. -D EXTRA_LINK="../ftd2xx/i386" Then open PINPROC.sln in Visual Studio, switch to the Debug or Release configuration and perform ALL_BUILD. It will place the libary and sample programs in `build/Debug` and `build/Release`.