hyperion.ng/libsrc/events/CMakeLists.txt
2023-11-15 22:44:46 +01:00

29 lines
880 B
CMake

add_library(events
${CMAKE_SOURCE_DIR}/include/events/EventEnum.h
${CMAKE_SOURCE_DIR}/include/events/EventHandler.h
${CMAKE_SOURCE_DIR}/include/events/OsEventHandler.h
${CMAKE_SOURCE_DIR}/libsrc/events/EventHandler.cpp
${CMAKE_SOURCE_DIR}/libsrc/events/OsEventHandler.cpp
)
if(UNIX AND NOT APPLE)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS DBus QUIET)
if(Qt${QT_VERSION_MAJOR}DBus_FOUND)
target_link_libraries(events Qt${QT_VERSION_MAJOR}::DBus)
target_compile_definitions(events PRIVATE HYPERION_HAS_DBUS)
endif()
endif()
target_link_libraries(events hyperion-utils)
if(APPLE)
# find_library(FOUNDATION_LIBRARY Foundation REQUIRED)
set_source_files_properties(OsEventHandler.cpp PROPERTIES COMPILE_FLAGS "-x objective-c++")
# target_link_libraries(events ${FOUNDATION_LIBRARY})
# target_include_directories(events PRIVATE ${FOUNDATION_LIBRARY})
endif()