@@ -33,7 +33,7 @@ option(DPP_USE_EXTERNAL_JSON "Use an external installation of nlohmann::json" OF
3333option (DPP_USE_PCH "Use precompiled headers to speed up compilation" OFF )
3434option (AVX_TYPE "Force AVX type for speeding up audio mixing" OFF )
3535option (DPP_TEST_VCPKG "Force VCPKG build without VCPKG installed (for development use only!)" OFF )
36- option (DPP_MODULES "Support for C++20 modules" OFF )
36+ option (DPP_MODULES "Support for C++20 modules (experimental) " OFF )
3737
3838include (CheckCXXSymbolExists)
3939set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
@@ -161,38 +161,3 @@ if (NOT WIN32)
161161 target_link_libraries (dpp PRIVATE std::filesystem)
162162endif ()
163163
164- if (DPP_MODULES)
165- 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)
195- else ()
196- message ("-- C++20 Modules support: ${Red} DISABLED${ColourReset} (enable with -DDPP_MODULES=ON)" )
197- endif ()
198-
0 commit comments