cmake: update FindBluelib module
This commit is contained in:
@@ -49,7 +49,7 @@ if (Bluelib_STATIC)
|
|||||||
set(_lib_suffix "-s")
|
set(_lib_suffix "-s")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(supported_components Core Object Term Cmd Io Serial Compress)
|
set(supported_components Core Ds Term Cmd Io Serial Compress)
|
||||||
set(components ${Bluelib_FIND_COMPONENTS})
|
set(components ${Bluelib_FIND_COMPONENTS})
|
||||||
string(REPLACE ";" ", " supported_components_string_list "${supported_components}")
|
string(REPLACE ";" ", " supported_components_string_list "${supported_components}")
|
||||||
|
|
||||||
@@ -118,12 +118,12 @@ if (Bluelib_FOUND)
|
|||||||
endforeach (component)
|
endforeach (component)
|
||||||
|
|
||||||
foreach (component ${created_targets})
|
foreach (component ${created_targets})
|
||||||
if ("${component}" STREQUAL "Object")
|
if ("${component}" STREQUAL "Ds")
|
||||||
if (NOT TARGET Bluelib::Core)
|
if (NOT TARGET Bluelib::Core)
|
||||||
message(FATAL_ERROR "Bluelib: Module 'Object' depends on 'Core', which was not specified in find_package()")
|
message(FATAL_ERROR "Bluelib: Module 'Ds' depends on 'Core', which was not specified in find_package()")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(Bluelib::Object INTERFACE Bluelib::Core)
|
target_link_libraries(Bluelib::Ds INTERFACE Bluelib::Core)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if ("${component}" STREQUAL "Term")
|
if ("${component}" STREQUAL "Term")
|
||||||
@@ -131,11 +131,11 @@ if (Bluelib_FOUND)
|
|||||||
message(FATAL_ERROR "Bluelib: Module 'Term' depends on 'Core', which was not specified in find_package()")
|
message(FATAL_ERROR "Bluelib: Module 'Term' depends on 'Core', which was not specified in find_package()")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT TARGET Bluelib::Object)
|
if (NOT TARGET Bluelib::Ds)
|
||||||
message(FATAL_ERROR "Bluelib: Module 'Term' depends on 'Object', which was not specified in find_package()")
|
message(FATAL_ERROR "Bluelib: Module 'Term' depends on 'Ds', which was not specified in find_package()")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(Bluelib::Term INTERFACE Bluelib::Core Bluelib::Object)
|
target_link_libraries(Bluelib::Term INTERFACE Bluelib::Core Bluelib::Ds)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if ("${component}" STREQUAL "Serial")
|
if ("${component}" STREQUAL "Serial")
|
||||||
@@ -143,11 +143,11 @@ if (Bluelib_FOUND)
|
|||||||
message(FATAL_ERROR "Bluelib: Module 'Serial' depends on 'Core', which was not specified in find_package()")
|
message(FATAL_ERROR "Bluelib: Module 'Serial' depends on 'Core', which was not specified in find_package()")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT TARGET Bluelib::Object)
|
if (NOT TARGET Bluelib::Ds)
|
||||||
message(FATAL_ERROR "Bluelib: Module 'Serial' depends on 'Object', which was not specified in find_package()")
|
message(FATAL_ERROR "Bluelib: Module 'Serial' depends on 'Ds', which was not specified in find_package()")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(Bluelib::Serial INTERFACE Bluelib::Core Bluelib::Object)
|
target_link_libraries(Bluelib::Serial INTERFACE Bluelib::Core Bluelib::Ds)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if ("${component}" STREQUAL "Cmd")
|
if ("${component}" STREQUAL "Cmd")
|
||||||
@@ -155,15 +155,15 @@ if (Bluelib_FOUND)
|
|||||||
message(FATAL_ERROR "Bluelib: Module 'Cmd' depends on 'Core', which was not specified in find_package()")
|
message(FATAL_ERROR "Bluelib: Module 'Cmd' depends on 'Core', which was not specified in find_package()")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT TARGET Bluelib::Object)
|
if (NOT TARGET Bluelib::Ds)
|
||||||
message(FATAL_ERROR "Bluelib: Module 'Cmd' depends on 'Object', which was not specified in find_package()")
|
message(FATAL_ERROR "Bluelib: Module 'Cmd' depends on 'Ds', which was not specified in find_package()")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT TARGET Bluelib::Term)
|
if (NOT TARGET Bluelib::Term)
|
||||||
message(FATAL_ERROR "Bluelib: Module 'Cmd' depends on 'Term', which was not specified in find_package()")
|
message(FATAL_ERROR "Bluelib: Module 'Cmd' depends on 'Term', which was not specified in find_package()")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(Bluelib::Cmd INTERFACE Bluelib::Core Bluelib::Object Bluelib::Term)
|
target_link_libraries(Bluelib::Cmd INTERFACE Bluelib::Core Bluelib::Ds Bluelib::Term)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if ("${component}" STREQUAL "Io")
|
if ("${component}" STREQUAL "Io")
|
||||||
@@ -171,11 +171,11 @@ if (Bluelib_FOUND)
|
|||||||
message(FATAL_ERROR "Bluelib: Module 'Io' depends on 'Core', which was not specified in find_package()")
|
message(FATAL_ERROR "Bluelib: Module 'Io' depends on 'Core', which was not specified in find_package()")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT TARGET Bluelib::Object)
|
if (NOT TARGET Bluelib::Ds)
|
||||||
message(FATAL_ERROR "Bluelib: Module 'Io' depends on 'Object', which was not specified in find_package()")
|
message(FATAL_ERROR "Bluelib: Module 'Io' depends on 'Ds', which was not specified in find_package()")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(Bluelib::Io INTERFACE Bluelib::Core Bluelib::Object)
|
target_link_libraries(Bluelib::Io INTERFACE Bluelib::Core Bluelib::Ds)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if ("${component}" STREQUAL "Compress")
|
if ("${component}" STREQUAL "Compress")
|
||||||
@@ -183,7 +183,7 @@ if (Bluelib_FOUND)
|
|||||||
message(FATAL_ERROR "Bluelib: Module 'Compress' depends on 'Core', which was not specified in find_package()")
|
message(FATAL_ERROR "Bluelib: Module 'Compress' depends on 'Core', which was not specified in find_package()")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(Bluelib::Compress INTERFACE Bluelib::Core Bluelib::Object)
|
target_link_libraries(Bluelib::Compress INTERFACE Bluelib::Core Bluelib::Ds)
|
||||||
endif ()
|
endif ()
|
||||||
endforeach (component)
|
endforeach (component)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user