Skip to content

Commit

Permalink
fixup! CMakeLists.txt: fix CMAKE_INSTALL_PREFIX for non-Unix and MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
DDvO committed Mar 14, 2024
1 parent 0990b6c commit 5c70b00
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
# help CPackDeb please dpkg-shlibdeps
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.20.0")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS
"../lib/${CMAKE_INSTALL_FULL_LIBDIR}")
"../lib/${CMAKE_INSTALL_LIBDIR}")
else()
set(CMAKE_INSTALL_RPATH # must be done before add_executable()
"../lib/${CMAKE_INSTALL_FULL_LIBDIR}")
"../lib/${CMAKE_INSTALL_LIBDIR}")
endif()
endif()

Expand Down Expand Up @@ -186,15 +186,15 @@ endif()

# installation and uninstall

#if(CMAKE_SYSTEM_NAME MATCHES "Linux" OR (UNIX AND NOT APPLE))
#if(UNIX AND NOT APPLE)
set(CMAKE_INSTALL_PREFIX "/usr")
#else()
# set(CMAKE_INSTALL_PREFIX "tmp")
#endif()
include(GNUInstallDirs) # CMAKE_INSTALL_PREFIX must be set before
if(DEFINED ENV{ROOTFS})
set(CMAKE_INSTALL_PREFIX $ENV{ROOTFS} CACHE PATH "comment" FORCE)
endif()
include(GNUInstallDirs) # CMAKE_INSTALL_PREFIX must be set before

install(FILES doc/Generic_CMP_client_API.pdf
DESTINATION ${CMAKE_INSTALL_DOCDIR}-dev
Expand Down

0 comments on commit 5c70b00

Please sign in to comment.