CMake: Fix rebuilding dkp ports

This commit is contained in:
Vicki Pfau 2020-05-28 21:51:54 -07:00
parent d243e93c15
commit 00aa6476c8
1 changed files with 5 additions and 4 deletions

View File

@ -8,12 +8,13 @@ set(CMAKE_SYSTEM_NAME Generic CACHE INTERNAL "system name")
function(create_devkit DEVKIT)
if(DEFINED ENV{DEVKIT${DEVKIT}})
set(DEVKIT${DEVKIT} $ENV{DEVKIT${DEVKIT}} PARENT_SCOPE)
set(DEVKIT${DEVKIT} $ENV{DEVKIT${DEVKIT}})
else()
set(DEVKIT${DEVKIT} ${DEVKITPRO}/devkit${DEVKIT} PARENT_SCOPE)
set(DEVKIT${DEVKIT} ${DEVKITPRO}/devkit${DEVKIT})
endif()
set(DEVKIT${DEVKIT} "${DEVKIT${DEVKIT}}" PARENT_SCOPE)
set(CMAKE_PROGRAM_PATH ${DEVKIT${DEVKIT}}/bin CACHE INTERNAL "program path")
set(CMAKE_PROGRAM_PATH "${DEVKIT${DEVKIT}}/bin" CACHE INTERNAL "program path")
set(cross_prefix_path "${CMAKE_PROGRAM_PATH}/${cross_prefix}")
set(cross_prefix_path "${cross_prefix_path}" PARENT_SCOPE)
@ -40,4 +41,4 @@ function(create_devkit DEVKIT)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY CACHE INTERNAL "")
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY CACHE INTERNAL "")
set(PKG_CONFIG_EXECUTABLE "/dev/null" CACHE INTERNAL "" FORCE)
endfunction()
endfunction()