File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -74,8 +74,17 @@ include(${CMAKE_MODULE_PATH}/get_version.cmake) # Determine project version
74
74
75
75
include (GNUInstallDirs) # Define GNU standard installation directories
76
76
77
- # Define install directory /usr/local/share [the new MacOS does not allow changes to /usr/share ]
78
- set (CMAKE_INSTALL_SHAREDIR /usr/local/share/)
77
+ # Define install directory /usr/local/share [not /usr/share on MacOS]
78
+ cmake_host_system_information (RESULT OS_NAME QUERY OS_NAME)
79
+ message (STATUS "Checking for OS_NAME: ${OS_NAME} " )
80
+
81
+ if (OS_NAME STREQUAL "macOS" )
82
+ message (STATUS "set(CMAKE_INSTALL_SHAREDIR /usr/local/share)" )
83
+ set (CMAKE_INSTALL_SHAREDIR /usr/local/share/)
84
+ else ()
85
+ message (STATUS "set(CMAKE_INSTALL_SHAREDIR /usr/share)" )
86
+ set (CMAKE_INSTALL_SHAREDIR /usr/share/)
87
+ endif ()
79
88
80
89
## Set C build flags
81
90
if (NOT MSVC )
You can’t perform that action at this time.
0 commit comments