Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
updated file to wrap if clause around find openscap lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Matos committed Jun 23, 2020
1 parent cd673d1 commit 6959857
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,19 @@ include(GNUInstallDirs)
set(CMAKE_AUTOMOC ON)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5XmlPatterns REQUIRED)
find_package(OPENSCAP REQUIRED)

add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0)

# This conditional is here to avoid checking openscap version if user supplies
# custom openscap parameters.
# if (NOT DEFINED OPENSCAP_LIBRARIES OR NOT DEFINED OPENSCAP_INCLUDE_DIRS)
# include("${CMAKE_ROOT}/Modules/FindPkgConfig.cmake")
# pkg_check_modules(OPENSCAP REQUIRED libopenscap>=1.2.0)
# endif()
if (NOT DEFINED OPENSCAP_LIBRARIES OR NOT DEFINED OPENSCAP_INCLUDE_DIRS)
if (NOT WIN32)
include("${CMAKE_ROOT}/Modules/FindPkgConfig.cmake")
pkg_check_modules(OPENSCAP REQUIRED libopenscap>=1.2.0)
else()
find_package(OPENSCAP REQUIRED)
endif()
endif()

if (APPLE)
# We need to use OPENSCAP_LINK_LIBRARIES for make to find openscap lib
Expand Down

0 comments on commit 6959857

Please sign in to comment.