File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,9 +162,36 @@ if (NOT WIN32)
162162endif ()
163163
164164if (DPP_MODULES)
165- add_subdirectory (src/modules )
166- target_compile_definitions (dpp PUBLIC DPP_MODULES )
167165 message ("-- C++20 Modules support: ${Green} ENABLED${ColourReset} " )
166+ add_library (dpp_module )
167+
168+ target_sources (dpp_module
169+ PUBLIC
170+ FILE_SET CXX_MODULES
171+ FILES "${CMAKE_CURRENT_SOURCE_DIR} /include/dpp/dpp.cppm"
172+ )
173+
174+ target_compile_features (dpp_module PUBLIC cxx_std_20 )
175+
176+ target_include_directories (dpp_module PUBLIC
177+ $<BUILD_INTERFACE :${PROJECT_SOURCE_DIR} /include >
178+ $<INSTALL_INTERFACE :include >
179+ )
180+
181+ target_link_libraries (dpp_module PUBLIC dpp )
182+
183+ add_library (dpp::module ALIAS dpp_module )
184+
185+ # Installation
186+ install (TARGETS dpp_module
187+ EXPORT ${PROJECT_NAME} Targets
188+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
189+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
190+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
191+ FILE_SET CXX_MODULES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /dpp/include
192+ )
193+
194+ target_compile_definitions (dpp PUBLIC DPP_MODULES )
168195else ()
169196 message ("-- C++20 Modules support: ${Red} DISABLED${ColourReset} (enable with -DDPP_MODULES=ON)" )
170197endif ()
Original file line number Diff line number Diff line change 1+ /* ***********************************************************************************
2+ *
3+ * D++, A Lightweight C++ library for Discord
4+ *
5+ * Copyright 2021 Craig Edwards and D++ contributors
6+ * (https://github.com/brainboxdotcc/DPP/graphs/contributors)
7+ *
8+ * Licensed under the Apache License, Version 2.0 (the "License");
9+ * you may not use this file except in compliance with the License.
10+ * You may obtain a copy of the License at
11+ *
12+ * http://www.apache.org/licenses/LICENSE-2.0
13+ *
14+ * Unless required by applicable law or agreed to in writing, software
15+ * distributed under the License is distributed on an "AS IS" BASIS,
16+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+ * See the License for the specific language governing permissions and
18+ * limitations under the License.
19+ *
20+ ************************************************************************************/
21+
22+ module ;
23+
24+ // Include the entire standard library so it doesn't cause issue in our headers
25+ #include < cstddef>
26+ #include < cstdint>
27+ #include < cstring>
28+ #include < ctime>
29+
30+ #include < algorithm>
31+ #include < charconv>
32+ #include < condition_variable>
33+ #include < cstddef>
34+ #include < ctime>
35+ #include < deque>
36+ #include < exception>
37+ #include < fstream>
38+ #include < functional>
39+ #include < iomanip>
40+ #include < iostream>
41+ #include < locale>
42+ #include < map>
43+ #include < memory>
44+ #include < mutex>
45+ #include < optional>
46+ #include < queue>
47+ #include < shared_mutex>
48+ #include < sstream>
49+ #include < string>
50+ #include < string_view>
51+ #include < thread>
52+ #include < type_traits>
53+ #include < unordered_map>
54+ #include < variant>
55+ #include < vector>
56+
57+ #include < dpp/export.h>
58+ #include < dpp/compat.h>
59+
60+ export module dpp;
61+
62+ export extern " C++" {
63+ #include < dpp/dpp.h>
64+ #include < dpp/dns.h>
65+ #include < dpp/restrequest.h>
66+ #include < dpp/unicode_emoji.h>
67+ }
Original file line number Diff line number Diff line change @@ -18033,8 +18033,8 @@ boundaries compute_boundaries(FloatType value)
1803318033//
1803418034// -e <= 60 or e >= -60 := alpha
1803518035
18036- constexpr int kAlpha = -60;
18037- constexpr int kGamma = -32;
18036+ inline constexpr int kAlpha = -60;
18037+ inline constexpr int kGamma = -32;
1803818038
1803918039struct cached_power // c = f * 2^e ~= 10^k
1804018040{
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments