Using cmake for cross compiling synfig.

I am learning the basics of cmake syntax during my spare time. So here are my questions
What include and lib files does the compiler used when it’s compiling synfig core, etl and synfig-studio?
Are there any “specific” files required for building an individual OS?
Thank you.

Look here:

I looked through the files that you listed in that links of yours, and frankly all I see are the general libraries that the autobuild use for generating the make file, not the actual file paths locations that the compiler uses such as “-I program/includes” or “-L program/libs/”
Can you post your make file that your using to compile the program itself, so I can take a look at the file itself to see what the compiler itself is doing?

You shouldn’t hardcore the path location of the libraries. Instead use cmake macros to detect the paths for each architecture and use them in your cmake script.

For example to find the paths for Boost libraries you can do something like this: … elists-txt

I think you will need to use find_package() to find the libraries like explained in the link Genete posted.

But if the library is not found then it needs to be compiled from source, you can use ExternalProject_Add() for this. The library project would need to be added as dependency for synfig on that case.

I’ve worked a bit with CMake, maybe we could work together on this.

Do all OS builds require the same libraries then? I was thinking along the line of putting the libraries in a separate folder for easy finding and updating. Is there any possibility that we have to create a find-modules for libraries that synfig uses?

–>i want to say no… and yes… : somes are already included in somes system and don’t need to be carried by the installation package for example… but at least, library dev’ version are required to build the app… <— this could be corrected by genete or konstantin

i use /opt/mylib in that case… (boost installation for example)

i can post my ldd output if you want to know what’s happen in debian like os (actually wheezy 7.4 - linux 3.2.0-4) about synfig 0.64.1&

cmake… can’t help you … but be interested to see your results there :slight_smile:

As far as I can tell, yes.

Studied the build scripts a bit more, the autobuild script install the dependencies to the system (or to a buildroot) and then launch the synfig-core/studio build. The synfig-core/studio build uses pkg-config to find the libraries (which it should find since they were installed by previous step).

The build for different OS differ mainly in the setup of the build environment (ie. the autobuild scripts differ).

At the moment the build uses pkg-config to find the libraries. So the find-modules would just hook up to that.

The thing is, what are you trying to achieve here? From what I understand, the only benefit from the switch to CMake would allow to build synfig in environments not based on GNU autotools.

Visual Studio support, ninja(Check it out) support, IDE project creation, etc that CMake supports.
I had done some research on the research subject matter what other devs think of autotools when comparing to cmake when it comes to cross platform development, and the general altitude they have is that they are against using GNU autotool for cross platform development especially if your planning to support windows.
The windows build instructions is badly outdated in the wiki, as the way to build is using cygwin that the instrucitons themselves are located at the exact same file that is, which no one seems to be bother editing that said page to point out that fact out.(And no, I am not going to fix that for you as it should be done that already)

Frankly I see no benefit in limiting the windows developer (Like me) into only using the GNU tool chain here.

Hmmm, I see your point. I was just curious about the motivation for doing this and I agree.

For cygwin build the dependencies are obtained using cygwin’s setup-x86.exe.

But for Visual Studio build we won’t have that option . So maybe the library dependencies will need to be build from source. I think all the sources should be available via rsync from:
rsync:// … rces/base/

But then we will need to have rsync available.

I know that, I have it installed on my computer currently. Let me tell ya, the dependencies aren’t always up to date.

Why do any windows dev need access to a dependencies list for development? This isn’t an OS that you need to compile it from source in order to get it running on it like linux. You can distribute the compile libraries for windows if you desire.

If we were to have cmake to target build the environment for linux than I understand what are you coming from.

you can have info here

who is you ?

… by you ? by us ? (… and who is us ?) by the one who know ? … by the one who want …by the one who can … ?

Did you not read the rest of the sentience that you left out in that quote of yours, concerning the location of the instructions?

Are you seriously having a hard time deciphering the sentience that I put in paraphrases? It’s for anybody who might ask me to fix it for them. The fact that I had to explain it, makes me question your reading compensation.