comparison CMakeLists.txt @ 801:fe27ed0c1eae

windows: cleanup .dll installation
author David Demelier <markand@malikania.fr>
date Mon, 12 Nov 2018 21:47:00 +0100
parents 8c44bbcbbab9
children 8460b4a34191
comparison
equal deleted inserted replaced
800:e4662edab00a 801:fe27ed0c1eae
45 # irccd - The irccd executable. 45 # irccd - The irccd executable.
46 # irccdctl - The irccdctl utility. 46 # irccdctl - The irccdctl utility.
47 # plugins - Official irccd plugins. 47 # plugins - Official irccd plugins.
48 # systemd - Unit file for systemd. 48 # systemd - Unit file for systemd.
49 # tests - The unit tests. 49 # tests - The unit tests.
50 # win32 - Additional files for Windows platform.
51 # 50 #
52 51
53 cmake_minimum_required(VERSION 3.10) 52 cmake_minimum_required(VERSION 3.10)
54 project(irccd) 53 project(irccd)
55 54
103 102
104 if (IRCCD_HAVE_JS) 103 if (IRCCD_HAVE_JS)
105 add_subdirectory(plugins) 104 add_subdirectory(plugins)
106 endif () 105 endif ()
107 106
108 # Platform specific.
109 if (WIN32)
110 add_subdirectory(win32)
111 endif ()
112
113 # Tests. 107 # Tests.
114 if (IRCCD_WITH_TESTS) 108 if (IRCCD_WITH_TESTS)
115 include(CTest) 109 include(CTest)
116 add_subdirectory(tests) 110 add_subdirectory(tests)
117 endif () 111 endif ()
118 112
119 add_subdirectory(cmake/export) 113 add_subdirectory(cmake/export)
114
115 if (CMAKE_SYSTEM_NAME MATCHES "Windows")
116 add_subdirectory(cmake/windows)
117 endif ()
120 118
121 message("Compiling with the following flags:") 119 message("Compiling with the following flags:")
122 message(" General flags: ${CMAKE_CXX_FLAGS}") 120 message(" General flags: ${CMAKE_CXX_FLAGS}")
123 message(" Debug flags: ${CMAKE_CXX_FLAGS_DEBUG}") 121 message(" Debug flags: ${CMAKE_CXX_FLAGS_DEBUG}")
124 message(" Release flags: ${CMAKE_CXX_FLAGS_RELEASE}") 122 message(" Release flags: ${CMAKE_CXX_FLAGS_RELEASE}")
130 message(" Javascript: ${IRCCD_WITH_JS_MSG}") 128 message(" Javascript: ${IRCCD_WITH_JS_MSG}")
131 message(" Tests: ${IRCCD_WITH_TESTS_MSG}") 129 message(" Tests: ${IRCCD_WITH_TESTS_MSG}")
132 message(" User docs: ${IRCCD_WITH_HTML_MSG}") 130 message(" User docs: ${IRCCD_WITH_HTML_MSG}")
133 message(" Doxygen: ${IRCCD_WITH_DOXYGEN_MSG}") 131 message(" Doxygen: ${IRCCD_WITH_DOXYGEN_MSG}")
134 message(" Package: ${IRCCD_PACKAGE_MSG}") 132 message(" Package: ${IRCCD_PACKAGE_MSG}")
135 message(" Vera: ${IRCCD_WITH_VERA_MSG}")
136 message("") 133 message("")
137 134
138 message("Installing plugins:") 135 message("Installing plugins:")
139 foreach (plugin ${IRCCD_PLUGINS}) 136 foreach (plugin ${IRCCD_PLUGINS})
140 string(TOUPPER ${plugin} name) 137 string(TOUPPER ${plugin} name)
141 irccd_indent_message(" ${plugin}: " "${IRCCD_WITH_PLUGIN_${name}_MSG}" 22) 138 irccd_indent_message(" ${plugin}: " "${IRCCD_WITH_PLUGIN_${name}_MSG}" 22)
142 endforeach () 139 endforeach ()
143 message("") 140 message("")
144 141
145 if (WIN32) 142 if (CMAKE_SYSTEM_NAME MATCHES "Windows")
146 message("Installing these DLLs:") 143 message("Installing these DLLs:")
147 foreach (name ${IRCCD_DLLS}) 144 foreach (name ${IRCCD_DLLS})
148 irccd_indent_message(" ${name}: " "${${name}}" 30) 145 irccd_indent_message(" ${name}: " "${${name}}" 30)
149 endforeach () 146 endforeach ()
150 message("") 147 message("")