FIX: use unique object lib name

This commit is contained in:
Dominik Meyer 2021-10-25 23:29:48 +02:00
parent 9808646bac
commit 9074fe3631
No known key found for this signature in database
GPG Key ID: B4C312B600606B64

View File

@ -42,17 +42,17 @@ SET(EVENTMANAGER_SOURCES
src/EventManager/Manager.cpp
)
add_library(objlib OBJECT ${EVENTMANAGER_SOURCES})
set_property(TARGET objlib PROPERTY POSITION_INDEPENDENT_CODE 1)
target_include_directories(objlib
add_library(em-objlib OBJECT ${EVENTMANAGER_SOURCES})
set_property(TARGET em-objlib PROPERTY POSITION_INDEPENDENT_CODE 1)
target_include_directories(em-objlib
PUBLIC
include
PRIVATE
src
)
target_link_libraries(objlib PUBLIC Threads::Threads)
target_link_libraries(em-objlib PUBLIC Threads::Threads)
add_library(eventmanager SHARED $<TARGET_OBJECTS:objlib>)
add_library(eventmanager SHARED $<TARGET_OBJECTS:em-objlib>)
target_include_directories(eventmanager
PUBLIC
include
@ -61,7 +61,7 @@ target_include_directories(eventmanager
)
target_link_libraries(eventmanager PUBLIC Threads::Threads)
add_library(eventmanager-static STATIC $<TARGET_OBJECTS:objlib>)
add_library(eventmanager-static STATIC $<TARGET_OBJECTS:em-objlib>)
target_include_directories(eventmanager-static
PUBLIC
include