Skip to content

Commit f91cf10

Browse files
committed
fix OSX build
Change-Id: I43c9b7ca703f49b242a7915ed71a07405e131ef0
1 parent 7d510a9 commit f91cf10

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/utests/CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,18 @@ enable_testing()
1010
include_directories(${CMAKE_SOURCE_DIR}/src/)
1111
include_directories("${GMOCK_DIR}/include")
1212

13+
if(APPLE)
14+
include_directories("${CMAKE_SOURCE_DIR}/src/MacMSRDriver") # target_include_directories doesn't work
15+
endif()
16+
1317
file(GLOB LSPCI_TEST_FILES lspci-utest.cpp ${CMAKE_SOURCE_DIR}/src/lspci.cpp)
14-
set(LIBS Threads::Threads PCM_STATIC)
18+
19+
if(APPLE)
20+
set(LIBS PcmMsr Threads::Threads PCM_STATIC)
21+
else()
22+
set(LIBS Threads::Threads PCM_STATIC)
23+
endif()
24+
1525
add_executable(lspci-utest ${LSPCI_TEST_FILES})
1626

1727
target_link_libraries(

0 commit comments

Comments
 (0)