mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 13:02:35 +00:00
Fix build on systems with split ncurses/tinfo
On systems where ncurses is built with --with-termlib, libtinfo is a separate library. Building musikcube on such a system would fail with: ld: CMakeFiles/musikcube.dir/cursespp/App.cpp.o: undefined reference to symbol 'keypad' ld: /lib64/libtinfow.so.6: error adding symbols: DSO missing from command line Using pkgconfig to look up the required link libraries resolves the issue.
This commit is contained in:
parent
f6b1847593
commit
53c5d84be0
@ -78,7 +78,9 @@ add_definitions(-DNCURSES_WIDECHAR)
|
||||
set_target_properties(musikcube PROPERTIES LINK_FLAGS "-Wl,-rpath,./")
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
||||
target_link_libraries(musikcube ${musikcube_LINK_LIBS} ncursesw panelw musikcore)
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(NCURSES REQUIRED ncursesw panelw)
|
||||
target_link_libraries(musikcube ${musikcube_LINK_LIBS} ${NCURSES_LIBRARIES} musikcore)
|
||||
else()
|
||||
target_link_libraries(musikcube ${musikcube_LINK_LIBS} curses panel musikcore)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user