mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Build icon into the main executable on Windows.
This commit is contained in:
parent
7d57d08b32
commit
34f595cc78
@ -123,6 +123,12 @@ else()
|
||||
add_gcc_compiler_flags("-ansi")
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
set(CMAKE_RC_COMPILER_INIT windres)
|
||||
enable_language(RC)
|
||||
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
|
||||
endif()
|
||||
|
||||
if(APPLE OR MINGW)
|
||||
set(PROGNAME KeePassX)
|
||||
else()
|
||||
|
1
share/windows/icon.rc
Normal file
1
share/windows/icon.rc
Normal file
@ -0,0 +1 @@
|
||||
IDI_ICON1 ICON DISCARDABLE "keepassx.ico"
|
@ -105,6 +105,10 @@ set(keepassx_SOURCES
|
||||
streams/SymmetricCipherStream.cpp
|
||||
)
|
||||
|
||||
set(keepassx_SOURCES_MAINEXE
|
||||
main.cpp
|
||||
)
|
||||
|
||||
set(keepassx_MOC
|
||||
autotype/AutoType.h
|
||||
autotype/AutoTypeSelectDialog.h
|
||||
@ -179,12 +183,18 @@ set(keepassx_FORMS
|
||||
gui/group/EditGroupWidgetMain.ui
|
||||
)
|
||||
|
||||
if(MINGW)
|
||||
set(keepassx_SOURCES_MAINEXE
|
||||
${keepassx_SOURCES_MAINEXE}
|
||||
${CMAKE_SOURCE_DIR}/share/windows/icon.rc)
|
||||
endif()
|
||||
|
||||
qt4_wrap_ui(keepassx_SOURCES ${keepassx_FORMS})
|
||||
qt4_wrap_cpp(keepassx_SOURCES ${keepassx_MOC})
|
||||
|
||||
add_library(keepassx_core STATIC ${keepassx_SOURCES})
|
||||
|
||||
add_executable(${PROGNAME} WIN32 MACOSX_BUNDLE main.cpp)
|
||||
add_executable(${PROGNAME} WIN32 MACOSX_BUNDLE ${keepassx_SOURCES_MAINEXE})
|
||||
target_link_libraries(${PROGNAME}
|
||||
keepassx_core
|
||||
${QT_QTCORE_LIBRARY}
|
||||
|
Loading…
Reference in New Issue
Block a user