Skip to content

Commit 3039df5

Browse files
authored
Merge pull request #5 from gadomski/allow-user-provided-install-prefix
Use CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
2 parents 4108ab9 + 41b5453 commit 3039df5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
1414
set(CMAKE_CXX_EXTENSIONS OFF)
1515

1616
# Install to the build directory
17-
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}" CACHE STRING "CMake install prefix" FORCE)
17+
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
18+
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}" CACHE STRING "CMake install prefix" FORCE)
19+
endif()
1820

1921
# Use "d" suffix for debug builds
2022
# Do not use a suffix for RelWithDebInfo

0 commit comments

Comments
 (0)