Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Migrate building on Windows to using CMake
[xestiaab/.git] / source / CMakeFunctions / Application.cmake
1 set(MISC_TARGET_NAME misc)
3 set(MISC_FILE_LIST convert.cpp
4                    convert.h
5                    debug.h
6                    enums.h
7                    version.h)
9 add_library(${MISC_TARGET_NAME}
10             ${MISC_FILE_LIST})
12 set(FILE_LIST main.cpp
13               AppXestiaAddrBk.cpp
14               AppXestiaAddrBk.h
15               frmAbout.cpp
16               frmAbout.h
17               frmConflictResolution.cpp
18               frmConflictResolution.h
19               frmContact.cpp
20               frmContact.h
21               frmEditAccount.cpp
22               frmEditAccount.h
23               frmInvalidSSLCertificate.cpp
24               frmInvalidSSLCertificate.h
25               frmMain.cpp
26               frmMain.h
27               frmNewAccount.cpp
28               frmNewAccount.h
29               frmNewAccount-CardDAV2.cpp
30               frmPreferences.cpp
31               frmPreferences.h
32               frmSSLCertificate.cpp
33               frmSSLCertificate.h
34               frmUpdate.cpp
35               frmUpdate.h)
37 if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
38     list(APPEND FILE_LIST frmEditAccount.mm
39                              frmNewAccount.mm)
40 endif()
42 if (MSVC)
43     list(APPEND FILE_LIST os/msw/xestiaab.rc)
44     add_executable(xestiaab WIN32
45         ${FILE_LIST})
46 else()
47     add_executable(xestiaab
48         ${FILE_LIST})
49 endif()
52 message("${RUNTIME_OUTPUT_NAME_bitmapcode}")
54 target_include_directories(xestiaab
55     PUBLIC
56     ".")
57     
58 add_dependencies(xestiaab bitmapcode)
59     
60 list(APPEND LIBRARIES ${wxWidgets_LIBRARIES}
61                       ${LIBXML2_LIBRARY}
62                       sfml-audio
63                       CURL::libcurl
64                       actmgr
65                       carddav2
66                       common
67                       contacteditor
68                       export
69                       import
70                       misc
71                       search
72                       vcard
73                       widgets)
75 if (MSVC)
76     list(APPEND LIBRARIES wsock32
77                           wininet
78                           security
79                           cryptui
80                           crypt32)
81 endif()
83 target_link_libraries(xestiaab
84     LINK_PUBLIC
85     ${LIBRARIES}
86 )
88 file(GLOB DOCUMENTATION_INSTALL_FILES "${CMAKE_SOURCE_DIR}/../docs/*")
89 foreach(ITEM ${DOCUMENTATION_INSTALL_FILES})
90     if(IS_DIRECTORY "${ITEM}")
91         list(APPEND DOCUMENTATION_DEPLOY_FILES "${ITEM}")
92     else()
93         list(APPEND DOCUMENTATION_DEPLOY_DIRECTORIES "${ITEM}")
94     endif()
95 endforeach()
97 install(TARGETS xestiaab RUNTIME DESTINATION bin)
98 install(TARGETS odthelpbrowser RUNTIME DESTINATION bin)
99 install(FILES ${CMAKE_SOURCE_DIR}/xestiaab.1 DESTINATION share/man/man1)
100 install(FILES ${DOCUMENTATION_DEPLOY_FILES} DESTINATION share/doc/xestiaab)
101 install(FILES ${DOCUMENTATION_DEPLOY_DIRECTORIES} DESTINATION share/doc/xestiaab)
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy