What should I put for the build command in Eclipse?

Everything about development and the OpenMW source code.
Post Reply
User avatar
Thunderforge
Posts: 503
Joined: 06 Jun 2017, 05:57

What should I put for the build command in Eclipse?

Post by Thunderforge »

In the OpenMW setup instructions for Eclipse, it says this:
Now right-click on your project, and select "Properties". Go to "C/C++ build", uncheck "use default build command", and specify your command, like

make -j 4 -C ${ProjDirPath}../build

Note: Replace this example with your actual build command! Choose the -j flag based on the amount of effective CPU cores your system has available.


Now you should be able to build openmw.
I tried pasting that into the "build command" field. At first, I was told that there was no such directory before I realized that it was trying to print into "openmw../build", so I added a slash, making the command into "make -j 4 -C ${ProjDirPath}/../build" and created the directory on my file system. However, when I tried to run the build, I got this error:

Code: Select all

make: *** No rule to make target `all'.  Stop.
Is this the right command to be using? I installed cmake per the instructions earlier on that page, so I thought that that might have been the one I was supposed to be using. If it is the right command, is there something different I'm supposed to use?

If it matters, I selected "MacOSX GCC" as the toolchain. The instructions said to choose "Linux GCC", but I don't have that since I'm on macOS.
User avatar
psi29a
Posts: 5360
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: What should I put for the build command in Eclipse?

Post by psi29a »

You'll still need to run cmake to generate your make files before your IDE can do anything.
User avatar
Thunderforge
Posts: 503
Joined: 06 Jun 2017, 05:57

Re: What should I put for the build command in Eclipse?

Post by Thunderforge »

I was thinking that I was setting up Eclipse to run cmake for me. Is that part of these instructions?

For what it's worth, I'm accustomed to working with Java projects that use Maven or Gradle. I just clone the project in my IDE, it auto-detects that it is built with one of those frameworks, and then I can build the project straight in the IDE and get going without every touching the command line. It would be great if I could set up Eclipse the same way.
Post Reply