cmake: define FXSDK_COMPILER_INSTALL for library installs

This commit is contained in:
Lephenixnoir 2021-01-23 15:02:42 +01:00
parent fe36c99f98
commit 1992aac4bd
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495
2 changed files with 18 additions and 0 deletions

View file

@ -20,3 +20,12 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
# Determine compiler install path
execute_process(
COMMAND ${CMAKE_C_COMPILER} --print-search-dirs
COMMAND grep install
COMMAND sed "s/install: //"
OUTPUT_VARIABLE FXSDK_COMPILER_INSTALL
OUTPUT_STRIP_TRAILING_WHITESPACE
)

View file

@ -20,3 +20,12 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
# Determine compiler install path
execute_process(
COMMAND ${CMAKE_C_COMPILER} --print-search-dirs
COMMAND grep install
COMMAND sed "s/install: //"
OUTPUT_VARIABLE FXSDK_COMPILER_INSTALL
OUTPUT_STRIP_TRAILING_WHITESPACE
)