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

[CMake] Fix the build_images cmake target. #1132

Closed
ice0 opened this issue Jan 30, 2020 · 5 comments · Fixed by #1247
Closed

[CMake] Fix the build_images cmake target. #1132

ice0 opened this issue Jan 30, 2020 · 5 comments · Fixed by #1247

Comments

@ice0
Copy link
Collaborator

ice0 commented Jan 30, 2020

Generate images same as autotools script does.
Depends on #1131, #1225

@ice0 ice0 added this to the GSoC 2020: CMake milestone Mar 10, 2020
@ice0 ice0 changed the title [CMake] Finish the make_images cmake target. [CMake] Fix the build_images cmake target. Mar 12, 2020
@ice0
Copy link
Collaborator Author

ice0 commented Mar 12, 2020

When you try to run:
make build_images you will face 3 problems:

  1. synfig binary not found.
    CMake command depends on the assumption what binary can be found in your path environment. So if it is not already installed the target will fail. But we do not need it to be installed, because CMake allows to use another targets in add_custom_command function. Need to fix synfig-studio/images/CMakeLists.txt
  2. Images placed in the wrong folder. They must be located in share/pixmaps/synfigstudio/.
    You can see the correct location after running ./2-build-debug.sh in the _debug folder.
  3. build_images target always rebuilds images even if they already built. But it’s better to fix it in a separate issue/PR. ([CMake] build_images target always rebuild images #1229)

@AYESDIE
Copy link
Member

AYESDIE commented Mar 15, 2020

So we plan to use ${SYNFIG_BUILD_ROOT}/bin/synfig for the purpose of build_images? But we can only run that command on the assumption we have built synfig.

@ice0
Copy link
Collaborator Author

ice0 commented Mar 15, 2020

So we plan to use ${SYNFIG_BUILD_ROOT}/bin/synfig for the purpose of build_images?

Yes and no.
Yes - because this binary will be running to do the job.
No - becase you do not need to write "/path/to/bin/synfig", CMake have a better solution. Please look here: https://cmake.org/cmake/help/v3.0/command/add_custom_command.html

But we can only run that command on the assumption we have built synfig.

Yes. This is required dependency.

@AYESDIE
Copy link
Member

AYESDIE commented Mar 15, 2020

@ice0

They must be located in share/pixmaps/synfigstudio/.
You can see the correct location after running ./2-build-debug.sh in the _debug folder.

sif_icon.png and synfig_icon.png are build in _debug/build/share/pixmaps, so those 2 needs to be placed in output/share/pixmaps for CMake one too, right?

I'm almost ready with a PR for this one, except for the doubt I had.

@AYESDIE
Copy link
Member

AYESDIE commented Mar 15, 2020

I don't think it needs to be there. It shows no error on logs when I run it by placing everything inside output/share/pixmaps/synfigstudio considering the changes made in #1232. Except for #1229, I think it's ready. I'll be making a PR.

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

Successfully merging a pull request may close this issue.

2 participants