hsakmt: Fix BUILD_SHARED_LIBS usage

If BUILD_SHARED_LIBS doesn't get set at all, other projects importing
hsakmt may have an inconsistent state regarding SHARED vs STATIC.
Instead of setting the option and setting it as an option(), just detect
the variable and use it

Change-Id: I9d5a5fc6049ca5351f5e7c63d38ee9bfcb89bdad
Signed-off-by: Kent Russell <kent.russell@amd.com>
Αυτή η υποβολή περιλαμβάνεται σε:
Kent Russell authored and David Yat Sin committed 2024-09-19 19:44:53 +00:00
1 γονέας 3b61f75f49
υποβολή 2a9572dda0
1 file changed
+2 -4
@@ -12,10 +12,8 @@ include( CMakeFindDependencyMacro )
# If the option is ON link other dependent libraries dynamically
# If the option is OFF, then link libdrm and libdrm_amdgpu statically
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
if(BUILD_SHARED_LIBS)
if(@BUILD_SHARED_LIBS@)
include( "${CMAKE_CURRENT_LIST_DIR}/@HSAKMT_TARGET@Targets.cmake" )
else()
include( "${CMAKE_CURRENT_LIST_DIR}/@HSAKMT_STATIC_DRM_TARGET@Targets.cmake" )
endif()
endif()