commit 8f4dedc039190f5e734c47dcc4fc021b5793b659
authorSam Lantinga <slouken@libsdl.org>
Fri, 28 Sep 2018 21:03:39 -0700
changeset 12257d7a3aac08fc1
parent 12256 9f3949b8ec40
child 12258 231245d461a2
commit 8f4dedc039190f5e734c47dcc4fc021b5793b659
Author: MichaƂ Janiszewski <janisozaur+signed@gmail.com>
Date: Fri Sep 28 20:38:04 2018 +0200

CMake: fix building tests on Linux

In case where libunwind.h has been found, it will be used by compiler,
but linker wasn't updated to reflect use of this new library.
CMakeLists.txt
     1.1 --- a/CMakeLists.txt	Fri Sep 28 20:48:18 2018 -0700
     1.2 +++ b/CMakeLists.txt	Fri Sep 28 21:03:39 2018 -0700
     1.3 @@ -1059,6 +1059,12 @@
     1.4          include_directories(${IBUS_INCLUDE_DIRS})
     1.5          list(APPEND EXTRA_LIBS ${IBUS_LIBRARIES})
     1.6        endif()
     1.7 +      if(HAVE_LIBUNWIND_H)
     1.8 +        # We've already found the header, so REQUIRE the lib to be present
     1.9 +        pkg_search_module(UNWIND REQUIRED libunwind)
    1.10 +        pkg_search_module(UNWIND_GENERIC REQUIRED libunwind-generic)
    1.11 +        list(APPEND EXTRA_LIBS ${UNWIND_LIBRARIES} ${UNWIND_GENERIC_LIBRARIES})
    1.12 +      endif()
    1.13      endif()
    1.14  
    1.15      check_include_file("fcitx/frontend.h" HAVE_FCITX_FRONTEND_H)