那里有我的 CMakeLists.txt :
cmake_minimum_required( VERSION 2.8 )
set (CMAKE_VERBOSE_MAKEFILE ON)
project( a.out )
find_package(OpenGL)
find_package(PkgConfig REQUIRED)
pkg_search_module(GLFW REQUIRED glfw3)
pkg_search_module(CEGUI-GL REQUIRED CEGUI-0-OPENGL)
pkg_search_module(CEGUI REQUIRED CEGUI-0)
macro( config_project PROJNAME LIBNAME )
include_directories( ${${LIBNAME}_INCLUDE_DIR} )
target_link_libraries( ${PROJNAME} ${${LIBNAME}_LIBRARIES} )
endmacro()
add_definitions(-std=c++11)
add_executable(a.out src/ConsoleWindow.cc src/camera.cc src/main.cc)
config_project(a.out OPENGL)
config_project(a.out GLFW)
config_project(a.out CEGUI-GL)
config_project(a.out CEGUI)
所以,有PkgConfig
forCEGUI-0-OPENGL
和CEGUI-0
。里面有CEGUI-0.pc
:
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include/cegui-0
moduledir=${prefix}/lib/cegui-0.8
datafiles=${prefix}/share/cegui-0
Name: CEGUI-0
Description: The free GUI library for games and multi-media development.
Version: 0.8.2
Libs: -L${libdir} -lCEGUIBase-0
Cflags: -I${includedir} -I${includedir}/cegui
当我运行时cmake .
一切都很好,但在我的一个中.cc
我有:
#include <CEGUI/CEGUI.h>
当我编译文件时,我得到一个错误,比如找不到这样的文件......但locate
返回:
/usr/include/cegui-0/CEGUI/CEGUI.h
我做错了什么?