Skip to content

Commit

Permalink
Honor the -DCMAKE_INSTALL_PREFIX directive
Browse files Browse the repository at this point in the history
  • Loading branch information
davebx committed May 17, 2018
1 parent 3cc9c72 commit fe4586c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,12 @@ endif(NOT ${OPENMP_FOUND})
#-------------------------------------------------------------------------------
# default installation prefix
#-------------------------------------------------------------------------------
set(INSTALL_PREFIX /usr/local CACHE PATH "Installation prefix")
set(CMAKE_INSTALL_PREFIX ${INSTALL_PREFIX} CACHE INTERNAL "Installation prefix" FORCE)
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation prefix")
endif()
if(NOT DEFINED INSTALL_PREFIX)
set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE INTERNAL "Installation prefix" FORCE)
endif()
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
set(DEFAULT_LIBRARIES pthread)
else(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
Expand Down

0 comments on commit fe4586c

Please sign in to comment.