Skip to content

Commit

Permalink
Merge pull request #893 from davebx/cmake_merge
Browse files Browse the repository at this point in the history
Honor the -DCMAKE_INSTALL_PREFIX directive
  • Loading branch information
stevenweaver authored Jan 28, 2019
2 parents 8049d83 + 4103e5c commit 12efaf7
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,17 @@ 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)
set(DEFAULT_LIBRARIES dl pthread)
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")
set(DEFAULT_LIBRARIES dl pthread)
endif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")

#-------------------------------------------------------------------------------
# LIBCurl support
Expand Down

0 comments on commit 12efaf7

Please sign in to comment.