mirror of https://github.com/getdnsapi/getdns.git
build: fix naming of extension libraries
This commit is contained in:
parent
bda845ce43
commit
03fc32984e
102
CMakeLists.txt
102
CMakeLists.txt
|
@ -780,27 +780,27 @@ if (USE_LIBEV)
|
|||
set_property(TARGET ev_objects PROPERTY POSITION_INDEPENDENT_CODE 1)
|
||||
set_property(TARGET ev_objects PROPERTY C_STANDARD 11)
|
||||
if (ENABLE_STATIC)
|
||||
add_library(getdns_ex_ev STATIC $<TARGET_OBJECTS:ev_objects>)
|
||||
target_include_directories(getdns_ex_ev PRIVATE Libev::Libev)
|
||||
target_link_libraries(getdns_ex_ev PUBLIC getdns Libev::Libev)
|
||||
add_library(getdns_ext_ev STATIC $<TARGET_OBJECTS:ev_objects>)
|
||||
target_include_directories(getdns_ext_ev PRIVATE Libev::Libev)
|
||||
target_link_libraries(getdns_ext_ev PUBLIC getdns Libev::Libev)
|
||||
if (Libunbound_FOUND)
|
||||
target_link_libraries(getdns_ex_ev PUBLIC Libunbound::Libunbound)
|
||||
target_link_libraries(getdns_ext_ev PUBLIC Libunbound::Libunbound)
|
||||
endif ()
|
||||
set_target_properties(getdns_ex_ev PROPERTIES OUTPUT_NAME getdns_ex_ev${static_lib_suffix})
|
||||
set_target_properties(getdns_ext_ev PROPERTIES OUTPUT_NAME getdns_ext_ev${static_lib_suffix})
|
||||
endif ()
|
||||
if (ENABLE_SHARED)
|
||||
add_library(getdns_ex_ev_shared SHARED $<TARGET_OBJECTS:ev_objects>)
|
||||
target_include_directories(getdns_ex_ev_shared PRIVATE Libev::Libev)
|
||||
target_link_libraries(getdns_ex_ev_shared PUBLIC getdns_shared Libev::Libev)
|
||||
add_library(getdns_ext_ev_shared SHARED $<TARGET_OBJECTS:ev_objects>)
|
||||
target_include_directories(getdns_ext_ev_shared PRIVATE Libev::Libev)
|
||||
target_link_libraries(getdns_ext_ev_shared PUBLIC getdns_shared Libev::Libev)
|
||||
if (Libunbound_FOUND)
|
||||
target_link_libraries(getdns_ex_ev_shared PUBLIC Libunbound::Libunbound)
|
||||
target_link_libraries(getdns_ext_ev_shared PUBLIC Libunbound::Libunbound)
|
||||
endif ()
|
||||
set_target_properties(getdns_ex_ev_shared PROPERTIES OUTPUT_NAME getdns_ex_ev)
|
||||
target_shared_library_version(getdns_ex_ev_shared ${GETDNS_VERSION_CURRENT} ${GETDNS_VERSION_REVISION} ${GETDNS_VERSION_AGE})
|
||||
set_target_properties(getdns_ext_ev_shared PROPERTIES OUTPUT_NAME getdns_ext_ev)
|
||||
target_shared_library_version(getdns_ext_ev_shared ${GETDNS_VERSION_CURRENT} ${GETDNS_VERSION_REVISION} ${GETDNS_VERSION_AGE})
|
||||
file(STRINGS src/extension/libev.symbols symbols)
|
||||
target_shared_library_exports(getdns_ex_ev_shared getdns_ex_ev "${symbols}")
|
||||
target_shared_library_exports(getdns_ext_ev_shared getdns_ext_ev "${symbols}")
|
||||
if (NOT ENABLE_STATIC)
|
||||
add_library(getdns_ex_ev ALIAS getdns_ex_ev_shared)
|
||||
add_library(getdns_ext_ev ALIAS getdns_ext_ev_shared)
|
||||
endif ()
|
||||
endif ()
|
||||
else ()
|
||||
|
@ -831,27 +831,27 @@ if (USE_LIBEVENT2)
|
|||
set_property(TARGET event2_objects PROPERTY POSITION_INDEPENDENT_CODE 1)
|
||||
set_property(TARGET event2_objects PROPERTY C_STANDARD 11)
|
||||
if (ENABLE_STATIC)
|
||||
add_library(getdns_ex_event STATIC $<TARGET_OBJECTS:event2_objects>)
|
||||
target_include_directories(getdns_ex_event PRIVATE Libevent2::Libevent_code)
|
||||
target_link_libraries(getdns_ex_event PUBLIC getdns Libevent2::Libevent_core)
|
||||
add_library(getdns_ext_event STATIC $<TARGET_OBJECTS:event2_objects>)
|
||||
target_include_directories(getdns_ext_event PRIVATE Libevent2::Libevent_code)
|
||||
target_link_libraries(getdns_ext_event PUBLIC getdns Libevent2::Libevent_core)
|
||||
if (Libunbound_FOUND)
|
||||
target_link_libraries(getdns_ex_event PUBLIC Libunbound::Libunbound)
|
||||
target_link_libraries(getdns_ext_event PUBLIC Libunbound::Libunbound)
|
||||
endif ()
|
||||
set_target_properties(getdns_ex_event PROPERTIES OUTPUT_NAME getdns_ex_event${static_lib_suffix})
|
||||
set_target_properties(getdns_ext_event PROPERTIES OUTPUT_NAME getdns_ext_event${static_lib_suffix})
|
||||
endif ()
|
||||
if (ENABLE_SHARED)
|
||||
add_library(getdns_ex_event_shared SHARED $<TARGET_OBJECTS:event2_objects>)
|
||||
target_include_directories(getdns_ex_event_shared PRIVATE Libevent2::Libevent_code)
|
||||
target_link_libraries(getdns_ex_event_shared PUBLIC getdns_shared Libevent2::Libevent_core)
|
||||
add_library(getdns_ext_event_shared SHARED $<TARGET_OBJECTS:event2_objects>)
|
||||
target_include_directories(getdns_ext_event_shared PRIVATE Libevent2::Libevent_code)
|
||||
target_link_libraries(getdns_ext_event_shared PUBLIC getdns_shared Libevent2::Libevent_core)
|
||||
if (Libunbound_FOUND)
|
||||
target_link_libraries(getdns_ex_event_shared PUBLIC Libunbound::Libunbound)
|
||||
target_link_libraries(getdns_ext_event_shared PUBLIC Libunbound::Libunbound)
|
||||
endif ()
|
||||
set_target_properties(getdns_ex_event_shared PROPERTIES OUTPUT_NAME getdns_ex_event)
|
||||
target_shared_library_version(getdns_ex_event_shared ${GETDNS_VERSION_CURRENT} ${GETDNS_VERSION_REVISION} ${GETDNS_VERSION_AGE})
|
||||
set_target_properties(getdns_ext_event_shared PROPERTIES OUTPUT_NAME getdns_ext_event)
|
||||
target_shared_library_version(getdns_ext_event_shared ${GETDNS_VERSION_CURRENT} ${GETDNS_VERSION_REVISION} ${GETDNS_VERSION_AGE})
|
||||
file(STRINGS src/extension/libevent.symbols symbols)
|
||||
target_shared_library_exports(getdns_ex_event_shared getdns_ex_event "${symbols}")
|
||||
target_shared_library_exports(getdns_ext_event_shared getdns_ext_event "${symbols}")
|
||||
if (NOT ENABLE_STATIC)
|
||||
add_library(getdns_ex_event ALIAS getdns_ex_event_shared)
|
||||
add_library(getdns_ext_event ALIAS getdns_ext_event_shared)
|
||||
endif ()
|
||||
endif ()
|
||||
else ()
|
||||
|
@ -883,27 +883,27 @@ if (USE_LIBUV)
|
|||
set_property(TARGET uv_objects PROPERTY POSITION_INDEPENDENT_CODE 1)
|
||||
set_property(TARGET uv_objects PROPERTY C_STANDARD 11)
|
||||
if (ENABLE_STATIC)
|
||||
add_library(getdns_ex_uv STATIC $<TARGET_OBJECTS:uv_objects>)
|
||||
target_include_directories(getdns_ex_uv PRIVATE Libuv::Libuv)
|
||||
target_link_libraries(getdns_ex_uv PUBLIC getdns Libuv::Libuv)
|
||||
add_library(getdns_ext_uv STATIC $<TARGET_OBJECTS:uv_objects>)
|
||||
target_include_directories(getdns_ext_uv PRIVATE Libuv::Libuv)
|
||||
target_link_libraries(getdns_ext_uv PUBLIC getdns Libuv::Libuv)
|
||||
if (Libunbound_FOUND)
|
||||
target_link_libraries(getdns_ex_uv PUBLIC Libunbound::Libunbound)
|
||||
target_link_libraries(getdns_ext_uv PUBLIC Libunbound::Libunbound)
|
||||
endif ()
|
||||
set_target_properties(getdns_ex_uv PROPERTIES OUTPUT_NAME getdns_ex_uv${static_lib_suffix})
|
||||
set_target_properties(getdns_ext_uv PROPERTIES OUTPUT_NAME getdns_ext_uv${static_lib_suffix})
|
||||
endif ()
|
||||
if (ENABLE_SHARED)
|
||||
add_library(getdns_ex_uv_shared SHARED $<TARGET_OBJECTS:uv_objects>)
|
||||
target_include_directories(getdns_ex_uv_shared PRIVATE Libuv::Libuv)
|
||||
target_link_libraries(getdns_ex_uv_shared PUBLIC getdns_shared Libuv::Libuv)
|
||||
add_library(getdns_ext_uv_shared SHARED $<TARGET_OBJECTS:uv_objects>)
|
||||
target_include_directories(getdns_ext_uv_shared PRIVATE Libuv::Libuv)
|
||||
target_link_libraries(getdns_ext_uv_shared PUBLIC getdns_shared Libuv::Libuv)
|
||||
if (Libunbound_FOUND)
|
||||
target_link_libraries(getdns_ex_uv_shared PUBLIC Libunbound::Libunbound)
|
||||
target_link_libraries(getdns_ext_uv_shared PUBLIC Libunbound::Libunbound)
|
||||
endif ()
|
||||
set_target_properties(getdns_ex_uv_shared PROPERTIES OUTPUT_NAME getdns_ex_uv)
|
||||
target_shared_library_version(getdns_ex_uv_shared ${GETDNS_VERSION_CURRENT} ${GETDNS_VERSION_REVISION} ${GETDNS_VERSION_AGE})
|
||||
set_target_properties(getdns_ext_uv_shared PROPERTIES OUTPUT_NAME getdns_ext_uv)
|
||||
target_shared_library_version(getdns_ext_uv_shared ${GETDNS_VERSION_CURRENT} ${GETDNS_VERSION_REVISION} ${GETDNS_VERSION_AGE})
|
||||
file(STRINGS src/extension/libuv.symbols symbols)
|
||||
target_shared_library_exports(getdns_ex_uv_shared getdns_ex_uv "${symbols}")
|
||||
target_shared_library_exports(getdns_ext_uv_shared getdns_ext_uv "${symbols}")
|
||||
if (NOT ENABLE_STATIC)
|
||||
add_library(getdns_ex_uv ALIAS getdns_ex_uv_shared)
|
||||
add_library(getdns_ext_uv ALIAS getdns_ext_uv_shared)
|
||||
endif ()
|
||||
endif ()
|
||||
else ()
|
||||
|
@ -965,7 +965,7 @@ if (BUILD_TESTING)
|
|||
|
||||
if (USE_LIBEVENT2)
|
||||
add_executable(check_getdns_event ${GETDNS_TEST_SOURCE_FILES})
|
||||
target_link_libraries(check_getdns_event PRIVATE ${GETDNS_TEST_LINK_LIBS} getdns_ex_event)
|
||||
target_link_libraries(check_getdns_event PRIVATE ${GETDNS_TEST_LINK_LIBS} getdns_ext_event)
|
||||
add_test(NAME test_libevent COMMAND check_getdns_event)
|
||||
set_property(TEST test_libevent PROPERTY
|
||||
ENVIRONMENT "GETDNS_TEST_PORT=44321;CK_TIMEOUT_MULTIPLIER=2;CK_LOG_FILE_NAME=check_getdns_event.log"
|
||||
|
@ -974,7 +974,7 @@ if (BUILD_TESTING)
|
|||
|
||||
if (USE_LIBEV)
|
||||
add_executable(check_getdns_ev ${GETDNS_TEST_SOURCE_FILES})
|
||||
target_link_libraries(check_getdns_ev PRIVATE ${GETDNS_TEST_LINK_LIBS} getdns_ex_ev)
|
||||
target_link_libraries(check_getdns_ev PRIVATE ${GETDNS_TEST_LINK_LIBS} getdns_ext_ev)
|
||||
add_test(NAME test_libev COMMAND check_getdns_ev)
|
||||
set_property(TEST test_libev PROPERTY
|
||||
ENVIRONMENT "GETDNS_TEST_PORT=45321;CK_TIMEOUT_MULTIPLIER=2;CK_LOG_FILE_NAME=check_getdns_ev.log"
|
||||
|
@ -983,7 +983,7 @@ if (BUILD_TESTING)
|
|||
|
||||
if (USE_LIBUV)
|
||||
add_executable(check_getdns_uv ${GETDNS_TEST_SOURCE_FILES})
|
||||
target_link_libraries(check_getdns_uv PRIVATE ${GETDNS_TEST_LINK_LIBS} getdns_ex_uv)
|
||||
target_link_libraries(check_getdns_uv PRIVATE ${GETDNS_TEST_LINK_LIBS} getdns_ext_uv)
|
||||
add_test(NAME test_libuv COMMAND check_getdns_uv)
|
||||
set_property(TEST test_libuv PROPERTY
|
||||
ENVIRONMENT "GETDNS_TEST_PORT=46321;CK_TIMEOUT_MULTIPLIER=2;CK_LOG_FILE_NAME=check_getdns_uv.log"
|
||||
|
@ -1055,25 +1055,25 @@ configure_file(getdns.pc.in getdns.pc @ONLY)
|
|||
if (ENABLE_STATIC)
|
||||
install(TARGETS getdns LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
if (USE_LIBEV)
|
||||
install(TARGETS getdns_ex_ev LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(TARGETS getdns_ext_ev LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif ()
|
||||
if (USE_LIBEVENT2)
|
||||
install(TARGETS getdns_ex_event LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(TARGETS getdns_ext_event LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif ()
|
||||
if (USE_LIBUV)
|
||||
install(TARGETS getdns_ex_uv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(TARGETS getdns_ext_uv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif ()
|
||||
endif ()
|
||||
if (ENABLE_SHARED)
|
||||
install(TARGETS getdns_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
if (USE_LIBEV)
|
||||
install(TARGETS getdns_ex_ev_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(TARGETS getdns_ext_ev_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif ()
|
||||
if (USE_LIBEVENT2)
|
||||
install(TARGETS getdns_ex_event_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(TARGETS getdns_ext_event_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif ()
|
||||
if (USE_LIBUV)
|
||||
install(TARGETS getdns_ex_uv_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(TARGETS getdns_ext_uv_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif ()
|
||||
endif ()
|
||||
if (BUILD_GETDNS_QUERY)
|
||||
|
@ -1133,17 +1133,17 @@ if (BUILD_EXAMPLES)
|
|||
if (USE_LIBEVENT2)
|
||||
add_executable(example-simple-answers spec/example/example-simple-answers.c)
|
||||
target_include_directories(example-simple-answers PRIVATE spec/example)
|
||||
target_link_libraries(example-simple-answers PRIVATE getdns getdns_ex_event)
|
||||
target_link_libraries(example-simple-answers PRIVATE getdns getdns_ext_event)
|
||||
set_property(TARGET example-simple-answers PROPERTY C_STANDARD 11)
|
||||
|
||||
add_executable(example-tree spec/example/example-tree.c)
|
||||
target_include_directories(example-tree PRIVATE spec/example)
|
||||
target_link_libraries(example-tree PRIVATE getdns getdns_ex_event)
|
||||
target_link_libraries(example-tree PRIVATE getdns getdns_ext_event)
|
||||
set_property(TARGET example-tree PROPERTY C_STANDARD 11)
|
||||
|
||||
add_executable(example-reverse spec/example/example-reverse.c)
|
||||
target_include_directories(example-reverse PRIVATE spec/example)
|
||||
target_link_libraries(example-reverse PRIVATE getdns getdns_ex_event)
|
||||
target_link_libraries(example-reverse PRIVATE getdns getdns_ext_event)
|
||||
set_property(TARGET example-reverse PROPERTY C_STANDARD 11)
|
||||
else ()
|
||||
message(WARNING "\
|
||||
|
|
Loading…
Reference in New Issue