Use of cmake

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Nical
Just popping in
Just popping in
Posts: 1
Joined: Tue Mar 08, 2016 12:18

Use of cmake

Postby Nical » Tue Mar 08, 2016 12:34

Hello,

I'm trying to compile a project using CEGUI.

I have the FindCEGUI.cmake in place (https://bitbucket.org/cegui/cegui/src/8 ... ew-default).

Here is the lines I have put in my CMakeLists.txt

Code: Select all

find_package(CEGUI REQUIRED)
if (CEGUI_FOUND)
  include_directories(${CEGUI_INCLUDE_DIR})
  target_link_libraries(globularone ${CEGUI_LIBRARIES})
endif()


But when I try to generate my Makefile i got this error:

-- Looking for CEGUI...
-- Could not locate CEGUI
CMake Error at cmake/FindCEGUI.cmake:247 (message):
Required library CEGUI not found! Install the library (including dev
packages) and try again. If the library is already installed, set the
missing variables manually in cmake.
Call Stack (most recent call first):
cmake/FindCEGUI.cmake:490 (findpkg_finish)
CMakeLists.txt:32 (find_package)


I have installed CEGUI with my debian SID package manager (libcegui-mk2-dev).

Any help on this ? I'm pretty confused. I don't understand which "missing variables" I should manually set.

Thanks

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Use of cmake

Postby Kulik » Wed Mar 09, 2016 19:41

Could be related to this:

Code: Select all

11:40:42   +mpreisler | it finds some paths from pkg-config but then fails to  │ 
                      | find CEGUIConfig.h or CEGUI/Config.h                   │       
11:40:55   +mpreisler | this needs some more digging                           │             
11:40:59   +mpreisler | I know the script works fine for Fedora                │       
11:41:47     Pheimors | /usr/include/cegui-0.8.4/CEGUI/Config.h but it is      │       
                      | right where it need to                                 │
11:42:12   +mpreisler | hmm, I'd expect it to be at                            │
                      | /usr/include/cegui-0/CEGUI/Config.h                    │
11:42:23   +mpreisler | seems the debian packager did some extra changes       │
                      | divergent from upstream                                │
11:44:15     Pheimors | ok thanks                                              │
11:44:49     Pheimors | it seems that I need to compile it myself or tweak the │   
                      | FindCEGUI...                                           │
11:44:49   +mpreisler | Pheimors: could you try to symlink                     │
                      | /usr/include/cegui-0 -> /usr/include/cegui-0.8.4?      │       
11:45:05   +mpreisler | we could alter the FindCEGUI script to find it even    │   
                      | with those changes                                     │             
11:45:09   +mpreisler | and share it with others                               │     
11:46:51     Pheimors | where do you see this cegui-0 ? don't find it in the   │       
                      | FindCEGUI.cmake                                        │
11:47:07   +mpreisler | Pheimors: look for cegui-${CEGUI_MAJOR_VERSION_...}    │         
11:47:20     Pheimors | yeah, I was on it..                                    │ 
11:47:21   +mpreisler | we have API compatibility within the same major        │
                      | versions                                               │
11:47:26   +mpreisler | and ABI within the same major.minor versions           │
11:47:37   +mpreisler | so it makes sense to have only one set of headers      │
                      | installed for one major version of CEGUI               │     
11:47:40   +mpreisler | that's the reason for cegui-0                          │
11:48:24     Pheimors | it works great :)                                      │
11:48:45     Pheimors | thanks

User avatar
Deathsbreed
Just popping in
Just popping in
Posts: 6
Joined: Wed Mar 30, 2016 21:06

Re: Use of cmake

Postby Deathsbreed » Thu Mar 31, 2016 10:03

Hello, I've also been having this issue with the Debian repo version of CEGUI. Creating a Symbolic link (as mpreisler suggests in the excerpt quoted by Kulik) works, however I wouldn't call that a complete solution. I am not sure if this naming convention for the include directory has to do with Debian naming conventions or if it has to do with the maintainer. Either way I am going to try to add support for Debian for the FindCEGUI.cmake file (seeing that otherwise the people that will be downloading my code with CEGUI will have issues with compiling on Debian systems). Once complete I will probably post it on the forums (if someone hasn't already).

Also, Kulik, thanks for the excerpt, it was hard for me to find where the problem was coming from exactly since the output of CMake was not very detailed.

User avatar
Deathsbreed
Just popping in
Just popping in
Posts: 6
Joined: Wed Mar 30, 2016 21:06

Re: Use of cmake

Postby Deathsbreed » Fri Apr 01, 2016 20:03

Okay, so I managed to get the FindCEGUI.cmake from before working, the issue with it is that it makes the include path /usr/include/cegui-0.8.4/CEGUI/ when the CEGUI.h header refers to files such as CEGUI/Affector.h, which means that it does not exist to the compiler. What I did is that I grabbed a FindIrrlicht.cmake and modified it for CEGUI. Here's the link:

https://github.com/Deathsbreed/FindCEGUI


Return to “Help”

Who is online

Users browsing this forum: Google [Bot] and 13 guests