Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Disable unit tests to be fixed in a future version
[xestiacalendar/.git] / source / CMakeFunctions / Application.cmake
1 set(FILE_LIST main.cpp
2               AppXestiaCalendar.cpp
3               AppXestiaCalendar.h
4               version.h)
6 if(APPLE)
7     list(APPEND FILE_LIST os/osx/XestiaCalendar.icns)
8 endif()
10 list(APPEND LIBRARIES ${wxWidgets_LIBRARIES}
11                       ${LIBXML2_LIBRARY}
12                       CURL::libcurl
13                       SQLite::SQLite3
14                       common
15                       forms
16                       CalendarDataStorage
17                       calendarevent
18                       calendarfreebusy
19                       calendarjournal
20                       calendarlist
21                       calendarobject
22                       calendartask
23                       calendartimezone
24                       widgets)
26 if (MSVC)
27     list(APPEND LIBRARIES wsock32
28                           wininet
29                           security
30                           cryptui
31                           crypt32)
32     list(APPEND FILE_LIST os/msw/xestiacalendar.rc)
33                           
34     add_executable(xestiacalendar WIN32
35                    ${FILE_LIST})
36     target_link_libraries(xestiacalendar LINK_PUBLIC
37                           ${LIBRARIES})
38 elseif(APPLE)
39     # Main icons
40     set_source_files_properties(os/osx/XestiaCalendar.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
41     set(MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/os/osx/Info.plist")
42     set(CMAKE_BUILD_PATH_USE_ORIGIN TRUE)
43     set(APPS "\${CMAKE_INSTALL_PREFIX}/xestiacalendar.app")
44     set(DIR ${CMAKE_BINARY_DIR})
45     
46     install(CODE "include(BundleUtilities)
47         fixup_bundle(\"${APPS}\" \"\" \"\")")
49     # Documentation
50     file(GLOB DocumentationFiles ${CMAKE_SOURCE_DIR}/../docs/*.fodt)
51     set_source_files_properties(${DocumentationFiles} 
52         PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
54     add_executable(xestiacalendar MACOSX_BUNDLE
55         ${FILE_LIST}
56         ${DocumentationFiles}
57         ${FrameworkFiles})
58     
59     install(TARGETS xestiacalendar
60         BUNDLE DESTINATION . COMPONENT Runtime
61         RUNTIME DESTINATION bin COMPONENT Runtime)
63     target_link_libraries(xestiacalendar LINK_PUBLIC
64                           stdc++
65                           objc
66                           ${COREFOUNDATION_FRAMEWORK}
67                           ${SECURITY_FRAMEWORK}
68                           ${SECURITYINTERFACE_FRAMEWORK}
69                           ${LIBRARIES})
71     set_target_properties(xestiacalendar PROPERTIES
72                           MACOSX_BUNDLE TRUE
73                           MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/os/osx/Info.plist)
74         
75     add_custom_command(
76         TARGET xestiacalendar
77         COMMAND ${CMAKE_COMMAND} -D SRC=$<TARGET_BUNDLE_DIR:xestiacalendar>/Contents/MacOS/xestiacalendar
78                                  -D DST=$<TARGET_BUNDLE_DIR:xestiacalendar>/Contents/Frameworks
79                                  -D SFML_FRAMEWORKS_LOCATION=${SFML_FRAMEWORKS_LOCATION}
80                                  -P ${CMAKE_CURRENT_SOURCE_DIR}/CMakeFunctions/CopyLibraries.cmake
81         POST_BUILD
82     )
83 else()
84     add_executable(xestiacalendar
85         ${FILE_LIST})
87     target_link_libraries(xestiacalendar LINK_PUBLIC
88                           ${LIBRARIES})
89 endif()
92 message("${RUNTIME_OUTPUT_NAME_bitmapcode}")
94 target_include_directories(xestiacalendar
95     PUBLIC
96     ".")
97     
98 add_dependencies(xestiacalendar bitmapcode)
100 file(GLOB DOCUMENTATION_INSTALL_FILES "${CMAKE_SOURCE_DIR}/../docs/*")
101 foreach(ITEM ${DOCUMENTATION_INSTALL_FILES})
102     if(IS_DIRECTORY "${ITEM}")
103         list(APPEND DOCUMENTATION_DEPLOY_FILES "${ITEM}")
104     else()
105         list(APPEND DOCUMENTATION_DEPLOY_DIRECTORIES "${ITEM}")
106     endif()
107 endforeach()
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