@@ -5,33 +5,22 @@ target_include_directories(SnoreToastActions INTERFACE
55)
66add_library (SnoreToast::SnoreToastActions ALIAS SnoreToastActions)
77
8-
8+ configure_file (config.h.in config.h @ONLY)
99add_library (libsnoretoast STATIC snoretoasts.cpp toasteventhandler.cpp linkhelper.cpp utils.cpp)
1010target_link_libraries (libsnoretoast PUBLIC runtimeobject shlwapi SnoreToast::SnoreToastActions)
1111target_compile_definitions (libsnoretoast PRIVATE UNICODE _UNICODE __WRL_CLASSIC_COM_STRICT__ WIN32_LEAN_AND_MEAN NOMINMAX)
12- target_compile_definitions (libsnoretoast PRIVATE
13- SNORETOAST_VERSION_MAJOR=${PROJECT_VERSION_MAJOR}
14- SNORETOAST_VERSION_MINOR=${PROJECT_VERSION_MINOR}
15- SNORETOAST_VERSION_PATCH=${PROJECT_VERSION_PATCH}
16- )
1712target_compile_definitions (libsnoretoast PUBLIC __WRL_CLASSIC_COM_STRICT__)
1813target_include_directories (libsnoretoast PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR} >)
1914set_target_properties (libsnoretoast PROPERTIES EXPORT_NAME LibSnoreToast)
2015add_library (SnoreToast::LibSnoreToast ALIAS libsnoretoast)
21-
22-
2316generate_export_header(libsnoretoast)
2417
2518create_icon_rc(${PROJECT_SOURCE_DIR} /data/zzz.ico TOAST_ICON)
2619add_executable (snoretoast WIN32 main.cpp ${TOAST_ICON} )
2720target_link_libraries (snoretoast PRIVATE SnoreToast::LibSnoreToast snoreretoastsources)
2821target_compile_definitions (snoretoast PRIVATE UNICODE _UNICODE WIN32_LEAN_AND_MEAN NOMINMAX)
29- # if there are changes to the callback mechanism we need to change the uuid for the activator SNORETOAST_CALLBACK_UUID
30- target_compile_definitions (snoretoast PRIVATE
31- SNORETOAST_CALLBACK_UUID="{383803B6-AFDA-4220-BFC3-0DBF810106BF}"
32- )
3322add_executable (SnoreToast::SnoreToast ALIAS snoretoast)
3423
3524install (TARGETS snoretoast SnoreToastActions EXPORT LibSnoreToastConfig RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
36- install (FILES snoretoastactions.h DESTINATION include /snoretoast)
25+ install (FILES snoretoastactions.h ${CMAKE_CURRENT_BINARY_DIR} /config.h DESTINATION include /snoretoast)
3726install (EXPORT LibSnoreToastConfig DESTINATION lib/cmake/libsnoretoast NAMESPACE SnoreToast::)
0 commit comments