User forums > Using Code::Blocks
Project dependent upon another project?
Sephiroth:
I did this regularly with MSVS 2005, but have not messed with it in ages. I am building a cross-platform utility that will allow users to backup saves/config/etc from any game whether they are on Windows or Linux. This will consist of two separate projects. Both must build for the complete solution.
One is a service that monitors for specified programs to be run and backs up their data when they start (you start game A, it sees this, and backs up whatever the user specified). This is literally a Windows service that has no UI and will be the same under Linux.
The other is a wxWidgets project that will provide a UI to specify games (executables) and what to backup for each game. This simply writes a configuration file that the service reads when it starts or when it restarts. This is crucial for making the project easy enough for non-techs to use.
The master project will build each of the child projects and (if possible) package the outputs of said projects into an installer or tgz for users to install. The master project will not have any actual code to build. It just builds the two child projects and then builds the installer.
How can I accomplish this? Also, would it be possible to somehow tie this entire thing to my Github so it lives there and I can allow others access to the code?
Miguel Gimenez:
You can create a project with two targets (Service and UI) and a virtual one including both.
Sephiroth:
Can you go into detail a bit? I can easily create individual projects but have NEVER tried anything involving multiple projects in CodeBlocks. Also, why do I need a virtual project if there is a real project targeting both?
Miguel Gimenez:
Read again my post, I am talking about two targets in one project.
Multiple projects can be joined in a workspace, but the target approach is better.
cacb:
Create a Code::Blocks workspace with multiple projects using same name build targets.
workspace-folder (contains MyProjects.workspace)
|
+- projectA-folder (contains projectA.cbp)
|
+- projectB-folder (contains projectB.cbp)
Select "Properties" on ProjectB and go to "Project Dependencies..." at the bottom.
Declare ProjectB to depend on ProjectA. This info will be saved in the MyProjects.workspace file only.
When you build ProjectB , then projectA will be checked for necessary build first.
Navigation
[0] Message Index
[#] Next page
Go to full version