I am using CMake 2.8.8 to build my project. Is there any way by which I can combine 32 bit and 64 bit visual studio solutions in a single solution? Cmake doesn't do that for me.
since Cmake generates 2 solutions in two different diectories, is there a way I can combine these two solutions by say editing .vcxproj files or something?
Related
I am working on SFML and I am curious about the option that I can compile it myself. I found it in tutorials, but from the first line I became confused:
CMake is an open-source meta build system. Instead of building SFML, it builds what builds SFML: Visual Studio solutions ...
There is a build option in visual studio too, is there any difference between that build and CMake build?
What does it mean that it builds what builds SFML? It means library files?
Visual studio solutions? What does it mean? As far as i know, when i open a new project it is within a solution and i can add new projects to this solution (I am confused about why there must be more than one project in a solution too!).
What does it mean that CMake builds a solution? And what is it for?
There is sourcecode. People want to compile it. It is difficult and annoying to type the compile commands into a terminal.
People invent build systems, to make 1.) more easy. For example make files or what Visual Studio integrates and stores in its files, called solution.
There are projects, that are cross-platform. They could provide make files, solution files, files for Xcode, Eclipse and so on. This becomes difficult and annoying.
People invent systems, that creates build system to ease 3.). From a common set of files, several different build systems can be steered.
In your actual case: CMake creates the solution file, you can open the solution file and built SFML with that.
CMake is a wonderful tool for cross-platform development without the hassle of maintaining separate build utilities. On Windows, CMake can create a Visual Studio solution file based on its CMakeLists.txt file. On Linux, generally CMake outputs a makefile. CMake is compatible with many build tools, I recommend reading more of there documentation on their website to gain more information.
Edit: Just to be more clear. CMake literally builds what builds SFML since it creates the Visual Studio solution used to build SFML.
A build in VS for a solution is building the library itself. A CMake build generates the VS solution with which you would use to build the library.
See 1.
A VS solution is the full buildable setup containing 1 or more projects. Solutions can contain multiple projects since VS has a limitation on only 1 output per project. If you want multiple outputs (e.g. 4 dlls) each output needs it's own project.
I have successfully build PCL for 64 bit windows using CMake and Visual Studio 2013. I have build all dependencies by my own (boost, Flann, QHull and VTK). Now I need to create a 32 bit version. Unfortunately CMake has problems to reference the VTK libraries. For 64 bits it adds the full path to the visual studio project files e.g. "D:\path\to\vtk\64\vtk-6.1.lib". But for 32 bits it only adds "vtk.lib". Even the version number is missing which is always part of the filename. The compiler has no chance to find it. It would be very cumbersome to patch all the PCL projects by my own.
I have already compared the CMakeCache.txt files for 32 and 64 bit. Except the 32/64 bit differences they are equal.
Has anybody an idea what I have might done wrong?
The PCL CMake script loads the VTK using the find_package(VTK) command. The path to the package is specified by the VTK_DIR variable. This variable points to the folder where the VTKConfig.cmake is. For x64 and x86 you will have different folders. For some reason the x86 version of the VTKTargets.cmake file which belongs to the VTKConfig.cmake was empty. After copy and paste the content from its x64 counterpart and some search and replace I was able to compile the project.
So the root cause was that the VTKTargets.cmake was empty. But I do not know why it was empty. I had build the VTK in x64 and x86 mode.
I'm trying to add a project that must build as a 32bit library (let's call it sdk32) in a source tree that is configured for Visual Studio 2010 64 bit. I.e. every project is a 64 bit library or application, but I need this sdk32 project as a 32bit wrapper for an SDK.
I'm aware that in Linux one can use the -m32 flag to the compiler (as explained here Using QMAKE to build a both 32 and 64 bits versions of project); but is it possible to have a similar solution, so that in a console configured for VS2010 64bit (with its vcvarsall.bat x64 called), after running qmake -r for my tree I get every project configured for x64 but sdk32 will be configured for Win32? It should also work for qmake -r -tp vc
So far the only solution I can think of is a dirty trick, invoking a script (as explained here: Qt: Run a script BEFORE make) that would "understand" the x64 tags in the vcxproj and Makefiles and replace them with Win32, but this solution seems fragile to me, and too dependent on how the project looks like right now, which would prevent changes to the configuration in a comfortable way in the future.
I am sure this has happened before, but I couldn't find a solution after googling this for almost a day. Any suggestions?
PS: the "sdk32" project doesn't need QT at all. The issue is that we use qmake as the Makefile and .vcxproj files creation step (because many other projects do use Qt).
I have 2 different visual studio solutions. one is 32 bit solution and other is 64 bit solution. Is there any way I can merge those 2 into a single solution?
can I merge .vcxproj files or something?
Just do a diffmerge of the project files. They are plain xml files. That should work.
I want to add new prerequisites to my visual studio setup project. Searching, I found the "bootstrapper manifest generator" that looks very nice, but the problem is that it doesn't work well on 64bits (the checks that it does doesnt work (I check it trying it in 32 bits pc and 64)).
The thing is that i have to install a package first if the SO is 64 bits. How can i do it?