Skip to content

Commit 92cf9dc

Browse files
committed
changed OS detection in CMakeLists.txt
Signed-off-by: Martin Mayer <[email protected]>
1 parent 54db1d3 commit 92cf9dc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ endif()
4040

4141
option(USE_PI_MUTEX "Enables priority inheritance mutexes." ON)
4242
if(USE_PI_MUTEX)
43-
if(WIN32 OR APPLE)
44-
message("Mutexes with priority inheritance are not supported on your system. Using std mutexes.")
45-
else()
43+
if(CMAKE_SYSTEM_NAME STREQUAL Linux OR
44+
CMAKE_SYSTEM_NAME STREQUAL VxWorks OR
45+
CMAKE_SYSTEM_NAME STREQUAL QNX)
4646
target_compile_definitions(${PROJECT_NAME} PUBLIC "RCPPUTILS_USE_PIMUTEX")
47+
else()
48+
message("Mutexes with priority inheritance are not supported on your system. Using std mutexes.")
4749
endif()
4850
endif()
4951

0 commit comments

Comments
 (0)