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

Add CMake build files #6

Closed
wants to merge 1 commit into from
Closed

Conversation

VolkerEnderlein
Copy link
Collaborator

Original pull request by Markus Rickert (Bitbucket: rickertm, GitHub: rickertm).


This patch adds CMake support for simage, including a config file with simage::simage target and a CPack definition for packages.

@VolkerEnderlein
Copy link
Collaborator Author

Original comment by Roy Walmsley (Bitbucket: walroy, GitHub: walroy).


Hi Markus,

Thanks for this great contribution. I'll review it and get back to you.

Roy

@VolkerEnderlein
Copy link
Collaborator Author

Original comment by Volker Enderlein (Bitbucket: VolkerEnderlein, GitHub: VolkerEnderlein).


Hi Markus,

in the CPack part of the CMakeLists.txt file you use erroneously the SOQT_(MAJOR|MINOR|MICRO)VERSION variables. These should be SIMAGE(MAJOR|MINOR|MICRO)_VERSION.
Otherwise the CMake file works like a charm :)

Cheers Volker

@VolkerEnderlein
Copy link
Collaborator Author

Original comment by Markus Rickert (Bitbucket: rickertm, GitHub: rickertm).


Hi Volker,

thank you for pointing out this issue, should be fixed now. I'm glad to hear the build script works for you.

Markus

@VolkerEnderlein
Copy link
Collaborator Author

Original comment by Mario Koerner (Bitbucket: Renreok, GitHub: Renreok).


Hi Markus,

thank you very much for providing CMake Support for a lot of Coin3D libraries.

I'm currently trying to use your pull requests to compile the libraries with Visual Studio 2013. However, I have problems with the find_package, find_path and find_library directives you are using. E.g. for the simage library, CMake does not find the include file and library for gdiplus:

#!c++
Could NOT find GdiPlus (missing:  GDIPLUS_INCLUDE_DIRS GDIPLUS_LIBRARIES) 

I can make it work by using variables like CMAKE_INCLUDE_PATH, but I would expect that it works out-of-the-box on a Standard Windows setup.
Am I missing something in my local setup?

Mario

@VolkerEnderlein
Copy link
Collaborator Author

Original comment by Markus Rickert (Bitbucket: rickertm, GitHub: rickertm).


Hi Mario,

I typically build from a Visual Studio developer command prompt on Windows which seems to set some environment variables so CMake can find the Windows SDKs and Kits.

I added the registry keys for the SDKs and Kits to the FIND_PATH queries for GdiPlus and Vfw which seems to fix this for me outside of a developer command prompt.

Please let me know if this also fixes your issue.

Markus

@VolkerEnderlein
Copy link
Collaborator Author

Original comment by Mario Koerner (Bitbucket: Renreok, GitHub: Renreok).


Hi Markus,

thank you very much for this hint.
I should have known that running cmake from the VS command shell might solve the problem.
Of course, cmake finds gdiplus when I do so, probably because the INCLUDE and LIB variables are set and point to the SDK directories.
I also tried your latest fix, and cmake now also finds the library outside of the VS command prompt.

When I ran cmake for the first time, I had another problem with the Qt configuration. I have Qt 5.7.1 installed at my system, but cmake outputs the following message:

#!c++
Found unsuitable Qt version "5.7.1" from C:/Qt/5.7.1/5.7/msvc2013_64/bin/qmake.exe
Qt QTCORE library not found.

The reason is, that cmake comes with a find module for Qt4, but not for Qt5. That's why the find module for Qt4 prints this confusing message. Maybe you have an idea, how this situation can be detected easily to help people like me with an appropriate error message.
Setting CMAKE_PREFIX_PATH solved the problem for me.

In general your fixes helped me very much to compile simage, coin and SoQt with VS2013 and to link my project with Qt5. Thank you very much for providing these pull requests.

@walroy, to me it really makes sense to merge Markus' pull requests, because they are essential to get Coin running with newer build tools and library versions. What do you think?

Mario

@VolkerEnderlein
Copy link
Collaborator Author

Original comment by Roy Walmsley (Bitbucket: walroy, GitHub: walroy).


I've been following your recent discussions. Since you now seem content I will merge. I'll let you know when complete.

@VolkerEnderlein
Copy link
Collaborator Author

Original comment by Roy Walmsley (Bitbucket: walroy, GitHub: walroy).


OK. It's merged.

@VolkerEnderlein
Copy link
Collaborator Author

Original comment by Markus Rickert (Bitbucket: rickertm, GitHub: rickertm).


Hi Mario,

I'm glad to hear the GdiPlus issue is fixed for you.

Regarding Qt: Setting CMAKE_PREFIX_PATH is the recommended way according to the Qt5 documentation as they now include config files for CMake rather than the find module of Qt4. By default with the USE_QT5 option set to ON it will first look for those before falling back to Qt4 find modules. So far I haven't found a better way to handle both Qt4 and Qt5 support at the same time.

@walroy: thank you for merging.

Markus

@VolkerEnderlein VolkerEnderlein deleted the Coin3D_simage_pullrequest3 branch December 24, 2019 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant