Fix shared library build

This commit is contained in:
Hennadii Chernyshchyk
2021-10-05 19:07:12 +03:00
parent 1d49a63827
commit e0bc2a9b9f
5 changed files with 32 additions and 16 deletions
+5
View File
@@ -21,6 +21,11 @@ add_library(QHotkey::QHotkey ALIAS qhotkey)
target_link_libraries(qhotkey PUBLIC Qt${QT_MAJOR}::Core)
target_link_libraries(qhotkey PRIVATE Qt${QT_MAJOR}::Gui)
if(BUILD_SHARED_LIBS)
target_compile_definitions(qhotkey PRIVATE QHOTKEY_LIBRARY)
target_compile_definitions(qhotkey PUBLIC QHOTKEY_SHARED)
endif()
if(APPLE)
find_library(CARBON_LIBRARY Carbon)
mark_as_advanced(CARBON_LIBRARY)