Skip to content

Commit

Permalink
Adjust CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
cvonelm committed Sep 26, 2023
1 parent bf08186 commit 0bda084
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,19 @@ if(x86_energy_FOUND)
endif()
add_feature_info("x86_energy" x86_energy_FOUND "Provide additional power measurements using x86_energy")

# handle radare dependency
if (USE_RADARE)
if (Radare_FOUND)
target_compile_definitions(lo2s PUBLIC HAVE_RADARE)
target_link_libraries(lo2s PRIVATE PkgConfig::Radare)
target_sources(lo2s PRIVATE
src/radare.cpp
)
else()
message(SEND_ERROR "Radare2 not found but requested.")
endif()
endif()

if (USE_SENSORS)
if (Sensors_FOUND)
target_compile_definitions(lo2s PUBLIC HAVE_SENSORS)
Expand All @@ -263,19 +276,6 @@ if (USE_LIBAUDIT)
endif()
endif()

if (USE_RADARE)
if (Radare_FOUND)
target_compile_definitions(lo2s PUBLIC HAVE_RADARE)
target_link_libraries(lo2s PRIVATE PkgConfig::Radare)
target_sources(lo2s PRIVATE
src/radare.cpp
)
target_include_directories(lo2s PRIVATE ${Radare_INCLUDE_DIRS})
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${Radare_CFLAGS}")
else()
message(SEND_ERROR "Radare2 not found but requested.")
endif()
endif()

# generate version string used in lo2s
if(Git_FOUND)
Expand Down

0 comments on commit 0bda084

Please sign in to comment.