diff --git a/runtime/hsa-ext-finalize/CMakeLists.txt b/runtime/hsa-ext-finalize/CMakeLists.txt index abe5da593b..700ad04346 100755 --- a/runtime/hsa-ext-finalize/CMakeLists.txt +++ b/runtime/hsa-ext-finalize/CMakeLists.txt @@ -47,12 +47,12 @@ endif () set ( BUILD_VERSION_STRING "${BUILD_VERSION_MAJOR}.${BUILD_VERSION_MINOR}.${BUILD_VERSION_PATCH}" ) ## Find the hsakmt library and include files -find_file ( HSAKMT_INC "libhsakmt/hsakmt.h" ) +find_file ( HSAKMT_INC NAMES "hsakmt.h" "libhsakmt/hsakmt.h" ) find_library ( HSAKMT_LIB libhsakmt.so ) get_filename_component ( HSAKMT_LIB_PATH ${HSAKMT_LIB} DIRECTORY ) get_filename_component ( HSAKMT_INC_PATH ${HSAKMT_INC} DIRECTORY ) -include_directories ( ${HSAKMT_BUILD_INC_PATH} ) -link_directories (${HSAKMT_BUILD_LIB_PATH}) +include_directories ( ${HSAKMT_INC_PATH} ) +link_directories (${HSAKMT_LIB_PATH}) ## Find the hsa-runtime and include files find_file ( HSA_INC "hsa/hsa.h" ) diff --git a/runtime/hsa-ext-image/CMakeLists.txt b/runtime/hsa-ext-image/CMakeLists.txt index fc6e37ff1e..782d6d2b93 100755 --- a/runtime/hsa-ext-image/CMakeLists.txt +++ b/runtime/hsa-ext-image/CMakeLists.txt @@ -43,7 +43,7 @@ endif () set ( BUILD_VERSION_STRING "${BUILD_VERSION_MAJOR}.${BUILD_VERSION_MINOR}.${BUILD_VERSION_PATCH}" ) ## Find the hsakmt library and include files -find_file ( HSAKMT_INC "libhsakmt/hsakmt.h" ) +find_file ( HSAKMT_INC NAMES "hsakmt.h" "libhsakmt/hsakmt.h" ) find_library ( HSAKMT_LIB libhsakmt.so ) get_filename_component ( HSAKMT_LIB_PATH ${HSAKMT_LIB} DIRECTORY ) get_filename_component ( HSAKMT_INC_PATH ${HSAKMT_INC} DIRECTORY ) diff --git a/runtime/hsa-runtime-tools/CMakeLists.txt b/runtime/hsa-runtime-tools/CMakeLists.txt index 1d40d6eb48..2860c18a3f 100755 --- a/runtime/hsa-runtime-tools/CMakeLists.txt +++ b/runtime/hsa-runtime-tools/CMakeLists.txt @@ -35,12 +35,12 @@ endif () set ( BUILD_VERSION_STRING "${BUILD_VERSION_MAJOR}.${BUILD_VERSION_MINOR}.${BUILD_VERSION_PATCH}" ) ## Find the hsakmt library and include files -find_file ( HSAKMT_INC "libhsakmt/hsakmt.h" ) +find_file ( HSAKMT_INC NAMES "hsakmt.h" "libhsakmt/hsakmt.h" ) find_library ( HSAKMT_LIB libhsakmt.so ) get_filename_component ( HSAKMT_LIB_PATH ${HSAKMT_LIB} DIRECTORY ) get_filename_component ( HSAKMT_INC_PATH ${HSAKMT_INC} DIRECTORY ) -include_directories ( ${HSAKMT_BUILD_INC_PATH} ) -link_directories (${HSAKMT_BUILD_LIB_PATH}) +include_directories ( ${HSAKMT_INC_PATH} ) +link_directories (${HSAKMT_LIB_PATH}) ## Find the hsa-runtime and include files find_file ( HSA_INC "hsa/hsa.h" )