1
0
mirror of https://github.com/preble/libpinproc synced 2026-02-22 18:15:25 +01:00

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.
This commit is contained in:
Tom Collins
2020-06-26 08:26:06 -07:00
committed by Gerry Stellenberg
parent caa09f6473
commit 624f7780a1
2 changed files with 6 additions and 15 deletions

View File

@@ -1,19 +1,11 @@
### ###
### CMake settings ### CMake settings
### ###
## Due to Mac OSX we need to keep compatibility with CMake 2.6 # Version 2.8.1 was released 2010-03-16 and is a reasonable minimum.
# see http://www.cmake.org/Wiki/CMake_Policies cmake_minimum_required(VERSION 2.8.1)
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()
# 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) if(POLICY CMP0081)
cmake_policy(SET CMP0081 OLD) cmake_policy(SET CMP0081 OLD)
endif() endif()
@@ -162,7 +154,6 @@ if(MSVC)
# c) Correct suffixes for static libraries # c) Correct suffixes for static libraries
if(NOT BUILD_SHARED_LIBS) if(NOT BUILD_SHARED_LIBS)
### General stuff
set(LIB_TARGET_SUFFIX "${LIB_SUFFIX}${LIB_RT_SUFFIX}") set(LIB_TARGET_SUFFIX "${LIB_SUFFIX}${LIB_RT_SUFFIX}")
endif() endif()
endif() endif()

View File

@@ -61,9 +61,9 @@ Make sure you have cmake installed for i686 (MinGW32) or x86_64 (MinGW64): `pacm
cd libpinproc cd libpinproc
mkdir build; cd build mkdir build; cd build
cmake .. -A Win32 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_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`. 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`.