Skip to content

Commit 91d5671

Browse files
author
Alan W. Irwin
committed
wxPLViewer: drop explicit link to the rt library
That explicit link causes trouble on Mac OS X (which does not support the rt library even though that is a POSIX standard) and is not required on Debian stable. Testing of additional Linux systems like Ubuntu and CentOS may show rt has to be explicitly linked in one/both of those cases in which case the fix is to uncomment one statement.
1 parent d99fa41 commit 91d5671

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

utils/CMakeLists.txt

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,21 @@ add_executable(parity_bit_check parity_bit_check.c)
7676
if(ENABLE_wxwidgets)
7777
# Build wxwidgets applications with same wxwidgets compile and link flags
7878
# as used with the PLplot wxwidgets device driver.
79-
if(UNIX)
80-
set(RT_LIB rt)
81-
endif(UNIX)
79+
80+
# Do not mention the rt library on Mac OS X because it causes linking issues
81+
# there. Also, there may be no need to explicitly mention rt on other Unix
82+
# systems. It is definitely not required on Debian stable, and it is not
83+
# mentioned at all for the wxwidgets linking. Therefore comment out
84+
# any mention for now, but restore if it turns out some Unix system other
85+
# than Mac OS X actually needs rt explicitly mentioned just for this
86+
# wxPLViewer case but not for the wxwidgets case.
87+
if(UNIX AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
88+
# set(RT_LIB rt)
89+
set(RT_LIB)
90+
else(UNIX AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
91+
set(RT_LIB)
92+
endif(UNIX AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
93+
8294
set(wxPLViewer_SRCS wxplviewer.cpp wxplframe.cpp ${CMAKE_SOURCE_DIR}/drivers/wxwidgets_comms.cpp)
8395
if(BUILD_SHARED_LIBS)
8496
set_source_files_properties(${wxPLViewer_SRCS}

0 commit comments

Comments
 (0)