samsface / godot-native-example

Example Godot native project using cmake
MIT License
32 stars 11 forks source link

build process trying to create folder in program files during compilation #6

Open HephepTeam opened 1 year ago

HephepTeam commented 1 year ago

Hello, I have an issue on windows 10, when I run debug.bar I get this error:

image

I looked into the scripts and it seems that it come from this part:

# Set the install prefix if(NOT DEFINED CMAKE_INSTALL_PREFIX) set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/gdnative-example") endif() string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")

in cmake_install.cmake

it's generated I guess so I tried to go deeper and I found this part:

# install build into example project by default if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set( CMAKE_INSTALL_PREFIX "../app/addons/example" CACHE PATH "..." FORCE) endif()

In CMakeLists.txt. here i'm stuck, I don't know if I installed something the wrong way or what. Can you help me? I can bypass the error by modifying cmake_install.cmake manually and launching again the command cmake --build . --target install

but it's not very convenient. btw thanks for this example projet !

samsface commented 1 year ago

@HephepTeam Is it this issue? https://github.com/samsface/godot-native-example/issues/3

HephepTeam commented 1 year ago

No it's way before. But with my modification and then compiling and installing through Visual Studio like in the video tutorial does the trick, I went ahead.