diff --git a/CMakeLists.txt b/CMakeLists.txt index cdf6829c4e..2fd18fce13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -381,9 +381,7 @@ if(MIOPEN_USE_HIPRTC) if(NOT MIOPEN_USE_COMGR) message(FATAL_ERROR "HIPRTC can be used only together with COMGR") endif() - if(WIN32) - find_package(hiprtc REQUIRED) - endif() + find_package(hiprtc REQUIRED) message(STATUS "Build with HIPRTC") endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4ed162ae92..1d5548db7e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -761,8 +761,12 @@ if( MIOPEN_BACKEND STREQUAL "OpenCL") elseif(MIOPEN_BACKEND STREQUAL "HIPOC" OR MIOPEN_BACKEND STREQUAL "HIP") target_link_libraries( MIOpen PRIVATE hip::device ) target_link_libraries( MIOpen INTERFACE hip::host ) - if(MIOPEN_USE_HIPRTC AND WIN32) - target_link_libraries( MIOpen PRIVATE hiprtc::hiprtc ) + if(MIOPEN_USE_HIPRTC) + if(WIN32) + target_link_libraries( MIOpen PRIVATE hiprtc::hiprtc ) + else() + target_link_libraries( MIOpen PRIVATE hiprtc) + endif() endif() if(ENABLE_HIP_WORKAROUNDS) # Workaround hip not setting its usage requirements correctly