Skip to content

Commit

Permalink
Use imported libraries in ddr-scanner
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Young <[email protected]>
  • Loading branch information
youngar committed Sep 17, 2019
1 parent ed395ba commit 47a1d1d
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions ddr/lib/ddr-scanner/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2017, 2017 IBM Corp. and others
# Copyright (c) 2017, 2019 IBM Corp. and others
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -33,41 +33,29 @@ target_link_libraries(omr_ddr_scanner

if(OMR_HOST_OS STREQUAL "win")
find_package(DiaSDK REQUIRED)

target_sources(omr_ddr_scanner
PRIVATE
pdb/PdbScanner.cpp
)

target_link_libraries(omr_ddr_scanner
PUBLIC
${DIASDK_LIBRARIES}
)
target_include_directories(omr_ddr_scanner
PUBLIC
${DIASDK_INCLUDE_DIRS}
DiaSDK::diasdk
)
elseif(OMR_HOST_OS STREQUAL "linux")

find_package(LibDwarf REQUIRED)

target_link_libraries(omr_ddr_scanner
PUBLIC
${LIBDWARF_LIBRARIES}
)
target_include_directories(omr_ddr_scanner
PUBLIC
${LIBDWARF_INCLUDE_DIRS}
)
target_compile_definitions(omr_ddr_scanner
PUBLIC
${LIBDWARF_DEFINITIONS}
LibDwarf::dwarf
)

target_sources(omr_ddr_scanner
PRIVATE
dwarf/DwarfFunctions.cpp
dwarf/DwarfScanner.cpp
)

elseif(OMR_HOST_OS STREQUAL "osx")
target_sources(omr_ddr_scanner
PRIVATE
Expand All @@ -82,6 +70,7 @@ elseif(OMR_HOST_OS STREQUAL "aix")
dwarf/DwarfFunctions.cpp
dwarf/DwarfScanner.cpp
)

target_link_libraries(omr_ddr_scanner
PUBLIC
${LIBDWARF_LIBRARIES}
Expand Down

0 comments on commit 47a1d1d

Please sign in to comment.