Skip to content

Commit

Permalink
Fix linking on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
scotty007 committed Jul 16, 2020
1 parent d91787b commit 4224fd1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ target_include_directories(base
PUBLIC SYSTEM ${Boost_INCLUDE_DIRS})
target_link_libraries(base
PUBLIC tess ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${LIBXML2_LDFLAGS})
if(${PLATFORM_LINUX})
# for some reason a dependency to boost-python is added on Debian 9/10 and Arch Linux (breaks linking w/o python libs)
target_link_libraries(base PUBLIC ${PYTHON_LIBRARIES})
endif()
# a dependency to boost-python is added on some systems (e.g. Debian, Arch Linux,
# macOS), which breaks linking (Linux) or runtime loading (macOS) w/o python libs here
target_link_libraries(base
PUBLIC ${PYTHON_LIBRARIES})

if (RT_LIBRARY)
target_include_directories(base
PUBLIC SYSTEM ${RT_INCLUDE_DIR})
Expand Down

0 comments on commit 4224fd1

Please sign in to comment.