Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom module source files are not included in generated Visual Studio project #91862

Open
jlwitthuhn opened this issue May 12, 2024 · 0 comments

Comments

@jlwitthuhn
Copy link

jlwitthuhn commented May 12, 2024

Tested versions

Reproducible in: 4.3.dev6 and latest master as of reporting: bdc0316

Not Reproducible in: 4.2.2

System information

Windows 11, Visual Studio 2022, SCons 4.7.0

Issue description

When configuring/building godot with the below command, source files from custom_modules directories are not included in the generated Visual Studio project.

scons p=windows vsproj=yes custom_modules=../modules

mymodule is still compiled and linked as expected during the build, it just does not appear in the project.

Steps to reproduce

  1. Create a minimal custom module directory outside of your godot source directory, the following layout works:
├─ godot
│  └─ <godot repo here>
└─ modules
   └─ mymodule
      ├─ config.py
      ├─ mymodule.cpp
      ├─ register_types.h
      └─ SCsub

config.py:

def can_build(env, platform):
    return True
def configure(env):
    pass

mymodule.cpp: empty

register_types.h:

#pragma once
#include "modules/register_module_types.h"
void initialize_mymodule_module(ModuleInitializationLevel p_level) {}
void uninitialize_mymodule_module(ModuleInitializationLevel p_level) {}

SCsub:

Import('env')
env.add_source_files(env.modules_sources, "./mymodule.cpp")
  1. Create the visual studio project by running scons p=windows vsproj=yes custom_modules=../modules
  2. Observe that with the latest master mymodule.cpp is not part of the VS project, but with 4.2.2 it is.

Minimal reproduction project (MRP)

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant