@@ -149,44 +149,6 @@ endif()
149149
150150add_library (FrameworkServer STATIC ${FRAMEWORK_SERVER_SRC} )
151151
152- # Precompiled Headers (PCH) for faster builds
153- # Framework base PCH - stable, frequently used headers
154- # Using PUBLIC so child targets can inherit via INTERFACE_PRECOMPILE_HEADERS
155- #
156- # IMPORTANT: FrameworkServer and FrameworkClient use REUSE_FROM Framework.
157- # This is critical because these targets have V8/libuv include directories and
158- # NODE_WANT_INTERNALS defined, which causes Windows SDK errno conflicts (EINVAL/ERANGE
159- # undefined) if they try to compile their own PCH. By reusing Framework's PCH
160- # (compiled without those settings), we avoid the issue.
161- target_precompile_headers (Framework PUBLIC
162- # C headers first - cerrno must be included before any headers that may
163- # be affected by libuv/Node.js which don't define EINVAL/ERANGE on Windows
164- <cerrno>
165-
166- # STL (stable, frequently used)
167- <memory>
168- <string>
169- <vector>
170- <unordered_map>
171- <functional>
172-
173- # Stable vendor headers
174- <spdlog/spdlog.h>
175- <glm/glm.hpp>
176- <glm/gtc/quaternion.hpp>
177- <nlohmann/json.hpp>
178-
179- # ECS - used by both server and client
180- <flecs/flecs.h>
181- )
182-
183- # FrameworkServer and FrameworkClient reuse Framework's PCH to avoid
184- # Windows SDK errno conflicts when compiling with V8/libuv include paths
185- target_precompile_headers (FrameworkServer REUSE_FROM Framework )
186- if (WIN32 )
187- target_precompile_headers (FrameworkClient REUSE_FROM Framework )
188- endif ()
189-
190152# Custom defines
191153target_compile_definitions (Framework PUBLIC MG_ENABLE_LOG=0 )
192154
@@ -267,9 +229,6 @@ target_include_directories(FrameworkNodeEngine PUBLIC
267229target_link_libraries (FrameworkNodeEngine PUBLIC libnode v8pp spdlog )
268230
269231# Node.js internal APIs require NODE_WANT_INTERNALS
270- # NOTE: Do NOT add ${LIBNODE_UV_INCLUDE_DIR} here - it causes Windows SDK errno
271- # conflicts because #include <errno.h> finds uv/errno.h instead of system errno.h.
272- # The main libnode include dir already has uv.h which includes uv/* properly.
273232target_compile_definitions (FrameworkNodeEngine PRIVATE NODE_WANT_INTERNALS=1 )
274233
275234# Match Framework compile definitions and features
0 commit comments