7e130369db
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>
[ROCm/ROCR-Runtime commit: 2a9572dda0]
20 rader
828 B
CMake
20 rader
828 B
CMake
@PACKAGE_INIT@
|
|
|
|
include( CMakeFindDependencyMacro )
|
|
|
|
# Locate dependent packages here. Finding them propagates usage requirements,
|
|
# if any, to our clients and ensures that their target names are in scope for
|
|
# the build. hsakmt has no cmake project dependencies so there is nothing to
|
|
# find. If we switch to use find_package with external (to ROCm) library
|
|
# dependencies (ie libnuma) then those packages should be located here using
|
|
# find_dependencies as shown below.
|
|
#find_dependency(Bar, 2.0)
|
|
|
|
# If the option is ON link other dependent libraries dynamically
|
|
# If the option is OFF, then link libdrm and libdrm_amdgpu statically
|
|
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()
|