File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.5 )
1+ cmake_minimum_required (VERSION 3.10 )
22project (pystring LANGUAGES CXX VERSION 1.1.4)
33
44option (BUILD_SHARED_LIBS "Build shared libraries (set to OFF to build static libs)" ON )
55
6+ # If the user hasn't configured cmake with an explicit
7+ # -DCMAKE_INSTALL_PREFIX=..., then set it to safely install into ./dist, to
8+ # help prevent the user from accidentally writing over /usr/local or whatever.
9+ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
10+ AND PROJECT_IS_TOP_LEVEL)
11+ set (CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR} /dist" CACHE PATH
12+ "Installation location" FORCE)
13+ endif ()
14+ message (STATUS "Installation path will be ${CMAKE_INSTALL_PREFIX} " )
15+
616add_library (pystring
717 pystring.cpp
818 pystring.h
You can’t perform that action at this time.
0 commit comments