-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,10 @@ | ||
include(GNUInstallDirs) | ||
|
||
# Rpath options necessary for shared library install to work correctly in user projects | ||
set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR}) | ||
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}) | ||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true) | ||
|
||
# Necessary for shared library with Visual Studio / Windows oneAPI | ||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS true) | ||
|
||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) | ||
# will not take effect without FORCE | ||
# CMAKE_BINARY_DIR for use from FetchContent | ||
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR} CACHE PATH "Install top-level directory" FORCE) | ||
if(PROJECT_IS_TOP_LEVEL AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) | ||
set_property(CACHE CMAKE_INSTALL_PREFIX PROPERTY VALUE "${PROJECT_BINARY_DIR}") | ||
endif() | ||
|
||
file(GENERATE OUTPUT .gitignore CONTENT "*") |