cmake: update FindBluelib
This commit is contained in:
@@ -106,6 +106,10 @@ if (Bluelib_FOUND)
|
|||||||
INTERFACE_INCLUDE_DIRECTORIES "${Bluelib_${component}_INCLUDE_DIR}")
|
INTERFACE_INCLUDE_DIRECTORIES "${Bluelib_${component}_INCLUDE_DIR}")
|
||||||
target_compile_definitions(Bluelib::${component} INTERFACE _CRT_SECURE_NO_WARNINGS=1)
|
target_compile_definitions(Bluelib::${component} INTERFACE _CRT_SECURE_NO_WARNINGS=1)
|
||||||
|
|
||||||
|
if (Bluelib_STATIC)
|
||||||
|
target_compile_definitions(Bluelib::${component} INTERFACE BLUELIB_STATIC=1)
|
||||||
|
endif ()
|
||||||
|
|
||||||
set_target_properties(Bluelib::${component} PROPERTIES
|
set_target_properties(Bluelib::${component} PROPERTIES
|
||||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||||
IMPORTED_LOCATION "${Bluelib_${component}_LIBRARY}")
|
IMPORTED_LOCATION "${Bluelib_${component}_LIBRARY}")
|
||||||
@@ -119,7 +123,7 @@ if (Bluelib_FOUND)
|
|||||||
message(FATAL_ERROR "Bluelib: Module 'Object' depends on 'Core', which was not specified in find_package()")
|
message(FATAL_ERROR "Bluelib: Module 'Object' depends on 'Core', which was not specified in find_package()")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(Bluelib::Object INTERFACE Bluelib::Core)
|
#target_link_libraries(Bluelib::Object INTERFACE Bluelib::Core)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if ("${component}" STREQUAL "Term")
|
if ("${component}" STREQUAL "Term")
|
||||||
@@ -131,7 +135,7 @@ if (Bluelib_FOUND)
|
|||||||
message(FATAL_ERROR "Bluelib: Module 'Term' depends on 'Object', which was not specified in find_package()")
|
message(FATAL_ERROR "Bluelib: Module 'Term' depends on 'Object', 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::Object)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if ("${component}" STREQUAL "Cmd")
|
if ("${component}" STREQUAL "Cmd")
|
||||||
@@ -147,7 +151,7 @@ if (Bluelib_FOUND)
|
|||||||
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::Object Bluelib::Term)
|
||||||
endif ()
|
endif ()
|
||||||
endforeach (component)
|
endforeach (component)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user