22 | | list(APPEND OROCOS-RTT_LIBRARIES ${Boost_THREAD_LIBRARY} ) |
| 22 | |
| 23 | # As Boost_THREAD_LIBRARY may be a list of libraries, and we can't deal |
| 24 | # with that in pkgconfig, we take 1) the library for this build type, or |
| 25 | # 2) the library if only one is listed, or 3) we error out. |
| 26 | STRING(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER) |
| 27 | if (DEFINED Boost_THREAD_LIBRARY_${CMAKE_BUILD_TYPE_UPPER}) |
| 28 | LIST(APPEND OROCOS-RTT_LIBRARIES ${Boost_THREAD_LIBRARY_${CMAKE_BUILD_TYPE_UPPER}}) |
| 29 | else (DEFINED Boost_THREAD_LIBRARY_${CMAKE_BUILD_TYPE_UPPER}) |
| 30 | LIST(LENGTH Boost_THREAD_LIBRARY COUNT_Boost_THREAD_LIBRARY) |
| 31 | if (1 LESS COUNT_Boost_THREAD_LIBRARY) |
| 32 | MESSAGE(FATAL_ERROR "Found multiple boost thread libraries, but not one specific to the current build type '${CMAKE_BUILD_TYPE_UPPER}'.") |
| 33 | endif (1 LESS COUNT_Boost_THREAD_LIBRARY) |
| 34 | list(APPEND OROCOS-RTT_LIBRARIES ${Boost_THREAD_LIBRARY} ) |
| 35 | endif (DEFINED Boost_THREAD_LIBRARY_${CMAKE_BUILD_TYPE_UPPER}) |
| 36 | |