Skip to content

Commit

Permalink
nuno
Browse files Browse the repository at this point in the history
  • Loading branch information
nmnobre committed Dec 16, 2024
1 parent c0309a3 commit 80e3e99
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
23 changes: 9 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -615,20 +615,15 @@ set(MASTER_HEADERS
${PROJECT_SOURCE_DIR}/mfem.hpp
${PROJECT_SOURCE_DIR}/mfem-performance.hpp)

# Installation options
set(MFEM_USE_GNUINSTALLDIRS OFF
CACHE BOOL "Enable to use the GNUInstallDirs CMake module.")
set(install_include_dir_default include)
set(install_bin_dir_default bin)
set(install_lib_dir_default lib)
set(install_share_dir_default share)
if (MFEM_USE_GNUINSTALLDIRS)
include(GNUInstallDirs)
set(install_include_dir_default "${CMAKE_INSTALL_INCLUDEDIR}")
set(install_bin_dir_default "${CMAKE_INSTALL_BINDIR}")
set(install_lib_dir_default "${CMAKE_INSTALL_LIBDIR}")
set(install_share_dir_default "${CMAKE_INSTALL_DATAROOTDIR}")
endif()
# Installation options (we use GNUInstallDirs but prefer lib on all platforms)
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Object code libraries (lib)")
endif()
include(GNUInstallDirs)
set(install_include_dir_default "${CMAKE_INSTALL_INCLUDEDIR}")
set(install_bin_dir_default "${CMAKE_INSTALL_BINDIR}")
set(install_lib_dir_default "${CMAKE_INSTALL_LIBDIR}")
set(install_share_dir_default "${CMAKE_INSTALL_DATAROOTDIR}")
mfem_cache_path(INSTALL_INCLUDE_DIR "${install_include_dir_default}"
"Relative or absolute path for installing header files.")
mfem_cache_path(INSTALL_BIN_DIR "${install_bin_dir_default}"
Expand Down
6 changes: 4 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -973,8 +973,10 @@ Note that running all the tests may take a while.
Installation prefix can be configured by setting the standard CMake variable
CMAKE_INSTALL_PREFIX; for fine-tuning the installation directories the following
variables can be used: INSTALL_INCLUDE_DIR, INSTALL_LIB_DIR, INSTALL_BIN_DIR,
INSTALL_SHARE_DIR, and INSTALL_CMAKE_DIR; alternatively, fine-tuning can be done
by setting MFEM_USE_GNUINSTALLDIRS=ON to use the CMake module GNUInstallDirs.
INSTALL_SHARE_DIR, and INSTALL_CMAKE_DIR; alternatively, and with lower precedence,
one can also use the variables defined by the CMake-provided GNUInstallDirs module:
CMAKE_INSTALL_INCLUDEDIR, CMAKE_INSTALL_LIBDIR, CMAKE_INSTALL_BINDIR and
CMAKE_INSTALL_DATAROOTDIR.
To install the library, use

make install
Expand Down

0 comments on commit 80e3e99

Please sign in to comment.