Skip to content

Commit

Permalink
Fixed build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
varjolintu committed May 5, 2018
1 parent a5be153 commit 845cf44
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
14 changes: 13 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,14 @@ set(autotype_SOURCES
autotype/test/AutoTypeTestInterface.h
)

set(browserUtil_SOURCES
browser/BrowserUtils.cpp
)

if(APPLE)
set(browserUtil_SOURCES ${browserUtil_SOURCES} browser/BrowserUtils.mm)
endif()

if(MINGW)
set(keepassx_SOURCES_MAINEXE
${keepassx_SOURCES_MAINEXE}
Expand All @@ -247,11 +255,15 @@ endif()
add_library(autotype STATIC ${autotype_SOURCES})
target_link_libraries(autotype Qt5::Core Qt5::Widgets)

add_library(browserUtils STATIC ${browserUtil_SOURCES})
target_link_libraries(browserUtils Qt5::Core Qt5::Widgets)

add_library(keepassx_core STATIC ${keepassx_SOURCES})

set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE)
target_link_libraries(keepassx_core
autotype
browserUtils
${keepassxcbrowser_LIB}
${sshagent_LIB}
Qt5::Core
Expand All @@ -267,7 +279,7 @@ target_link_libraries(keepassx_core
${ZLIB_LIBRARIES})

if(APPLE)
target_link_libraries(keepassx_core "-framework Foundation")
target_link_libraries(keepassx_core "-framework Foundation -framework AppKit")
if(Qt5MacExtras_FOUND)
target_link_libraries(keepassx_core Qt5::MacExtras)
endif()
Expand Down
3 changes: 0 additions & 3 deletions src/browser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,4 @@ if(WITH_XC_BROWSER)

add_library(keepassxcbrowser STATIC ${keepassxcbrowser_SOURCES})
target_link_libraries(keepassxcbrowser Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network sodium)
if(APPLE)
target_link_libraries(keepassxcbrowser "-framework AppKit")
endif()
endif()

0 comments on commit 845cf44

Please sign in to comment.