2021-03-26 11:22:55 +00:00
|
|
|
project(windows-notification)
|
2020-11-25 23:12:21 +00:00
|
|
|
|
2020-10-24 22:05:35 +00:00
|
|
|
find_packages(WINDOWS_NOTIFICATION_PACKAGES REQUIRED
|
|
|
|
Gee
|
|
|
|
GLib
|
|
|
|
GModule
|
|
|
|
GObject
|
|
|
|
GTK3
|
|
|
|
)
|
|
|
|
|
|
|
|
vala_precompile(WINDOWS_NOTIFICATION_VALA_C
|
|
|
|
SOURCES
|
|
|
|
src/plugin.vala
|
|
|
|
src/register_plugin.vala
|
|
|
|
CUSTOM_VAPIS
|
|
|
|
${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi
|
|
|
|
${CMAKE_BINARY_DIR}/exports/dino.vapi
|
|
|
|
${CMAKE_BINARY_DIR}/exports/qlite.vapi
|
2021-03-26 11:22:55 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/vapi/win32.vapi
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/vapi/shortcutcreator.vapi
|
2020-10-24 22:05:35 +00:00
|
|
|
PACKAGES
|
|
|
|
${WINDOWS_NOTIFICATION_PACKAGES}
|
|
|
|
)
|
|
|
|
|
2021-03-26 11:22:55 +00:00
|
|
|
set(WINDOWS_API_SOURCES
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/api/src/win32.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/api/src/converter.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/api/src/shortcutcreator.cpp
|
2020-10-25 15:52:49 +00:00
|
|
|
)
|
|
|
|
|
2021-03-26 11:22:55 +00:00
|
|
|
add_library(windows-notification SHARED ${WINDOWS_NOTIFICATION_VALA_C} ${WINDOWS_API_SOURCES})
|
2020-11-25 21:55:33 +00:00
|
|
|
|
2021-03-26 11:22:55 +00:00
|
|
|
target_include_directories(windows-notification
|
|
|
|
PRIVATE
|
|
|
|
${PROJECT_SOURCE_DIR}/api/include
|
2020-11-25 21:55:33 +00:00
|
|
|
)
|
|
|
|
|
2021-03-26 11:22:55 +00:00
|
|
|
find_library(shlwapi_LIBRARY shlwapi libshlwapi libshlwapi.a HINTS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
|
|
|
|
if(NOT shlwapi_LIBRARY)
|
|
|
|
message(FATAL_ERROR "shlwapi library not found")
|
|
|
|
endif(NOT shlwapi_LIBRARY)
|
|
|
|
|
|
|
|
find_library(propsys_LIBRARY propsys libpropsys libpropsys.a HINTS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
|
|
|
|
if(NOT propsys_LIBRARY)
|
|
|
|
message(FATAL_ERROR "propsys library not found")
|
|
|
|
endif(NOT propsys_LIBRARY)
|
|
|
|
|
|
|
|
find_library(ntdll_LIBRARY ntdll libntdll libntdll.a HINTS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
|
|
|
|
if(NOT ntdll_LIBRARY)
|
|
|
|
message(FATAL_ERROR "ntdll library not found")
|
|
|
|
endif(NOT ntdll_LIBRARY)
|
|
|
|
|
|
|
|
find_library(mincore_LIBRARY mincore libmincore libmincore.a HINTS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
|
|
|
|
if(NOT mincore_LIBRARY)
|
|
|
|
message(FATAL_ERROR "mincore library not found")
|
|
|
|
endif(NOT mincore_LIBRARY)
|
2020-11-20 11:58:53 +00:00
|
|
|
|
2021-03-26 11:22:55 +00:00
|
|
|
target_link_libraries(windows-notification libdino ${shlwapi_LIBRARY} ${propsys_LIBRARY} ${ntdll_LIBRARY} ${mincore_LIBRARY} ${WINDOWS_NOTIFICATION_PACKAGES})
|
|
|
|
target_compile_features(windows-notification PRIVATE cxx_std_20)
|
|
|
|
# target_compile_options(windows-notification PRIVATE -municode -DUNICODE -fcoroutines -iquote ../../include/winrt/yolort_impl)
|
|
|
|
target_compile_options(windows-notification PRIVATE -municode -DUNICODE -fcoroutines)
|
2020-11-20 11:58:53 +00:00
|
|
|
|
2020-10-24 22:05:35 +00:00
|
|
|
set_target_properties(windows-notification PROPERTIES PREFIX "")
|
|
|
|
set_target_properties(windows-notification PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/)
|
|
|
|
|
|
|
|
install(TARGETS windows-notification ${PLUGIN_INSTALL})
|