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

Commit 3f7b82b

Browse files
author
Carlos Matos
committed
Fixed issue where OPENSCAP_LINK_LIBRARIES seems to only be useful to macOS builds
1 parent 8822359 commit 3f7b82b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ if (NOT DEFINED OPENSCAP_LIBRARIES OR NOT DEFINED OPENSCAP_INCLUDE_DIRS)
3030
pkg_check_modules(OPENSCAP REQUIRED libopenscap>=1.2.0)
3131
endif()
3232

33+
if (APPLE)
34+
# We need to use OPENSCAP_LINK_LIBRARIES for make to find openscap lib
35+
set(OPENSCAP_LINK_LIB ${OPENSCAP_LINK_LIBRARIES})
36+
else()
37+
set(OPENSCAP_LINK_LIB ${OPENSCAP_LIBRARIES})
38+
endif()
39+
3340
# Gather info about openscap version
3441
if (DEFINED OPENSCAP_VERSION)
3542
# pkg_check_modules() defines the string OPENSCAP_VERSION, lets use it
@@ -119,7 +126,7 @@ set(SCAP_WORKBENCH_INCLUDE_DIRS
119126

120127
set(SCAP_WORKBENCH_LINK_LIBRARIES
121128
Qt5::Widgets Qt5::XmlPatterns
122-
${OPENSCAP_LINK_LIBRARIES})
129+
${OPENSCAP_LINK_LIB})
123130

124131
# ---------- RPATHS for linking
125132

0 commit comments

Comments
 (0)