Ошибка компоновщика среды выполнения CG в проекте cmake (g ++)

Я получаю следующие ошибки компоновщика:
/ usr / bin / ld: не могу найти -lCg
/ usr / bin / ld: не удается найти -lCgGL

Я использую FindCg.cmake frome здесь: http://code.google.com/p/nvidia-texture-tools/source/browse/branches/2.0/cmake/FindCg.cmake?r=452

Затем добавьте найденные библиотеки с помощью target_link_libraries ..

Когда я запускаю make с VERBOSE = 1 (см. Ниже), похоже, что он проходит правильный путь к библиотекам (/usr/lib64/libCgGL.so и /usr/lib64/libCg.so)

01- 0:30:09 loony@T-linux> make FightSpace VERBOSE=1
/usr/bin/cmake -H/home/loony/git/tengine -B/home/loony/git/tengine/build --check-build-system CMakeFiles/Makefile.cmake 0
make -f CMakeFiles/Makefile2 FightSpace
make[1]: Entering directory `/home/loony/git/tengine/build'
/usr/bin/cmake -H/home/loony/git/tengine -B/home/loony/git/tengine/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/loony/git/tengine/build/CMakeFiles 91
make -f CMakeFiles/Makefile2 Code/FightSpace/CMakeFiles/FightSpace.dir/all
make[2]: Entering directory `/home/loony/git/tengine/build'
make -f Code/TEPlatform/CMakeFiles/TEPlatform.dir/build.make Code/TEPlatform/CMakeFiles/TEPlatform.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/TEPlatform /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/TEPlatform /home/loony/git/tengine/build/Code/TEPlatform/CMakeFiles/TEPlatform.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/TEPlatform/CMakeFiles/TEPlatform.dir/build.make Code/TEPlatform/CMakeFiles/TEPlatform.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
make[3]: Nothing to be done for `Code/TEPlatform/CMakeFiles/TEPlatform.dir/build'.
make[3]: Leaving directory `/home/loony/git/tengine/build'
/usr/bin/cmake -E cmake_progress_report /home/loony/git/tengine/build/CMakeFiles  57
[  1%] Built target TEPlatform
make -f Code/TECore/CMakeFiles/TECore.dir/build.make Code/TECore/CMakeFiles/TECore.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/TECore /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/TECore /home/loony/git/tengine/build/Code/TECore/CMakeFiles/TECore.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/TECore/CMakeFiles/TECore.dir/build.make Code/TECore/CMakeFiles/TECore.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
make[3]: Nothing to be done for `Code/TECore/CMakeFiles/TECore.dir/build'.
make[3]: Leaving directory `/home/loony/git/tengine/build'
/usr/bin/cmake -E cmake_progress_report /home/loony/git/tengine/build/CMakeFiles  4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
[ 40%] Built target TECore
make -f Code/TEngine/CMakeFiles/TEngine.dir/build.make Code/TEngine/CMakeFiles/TEngine.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/TEngine /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/TEngine /home/loony/git/tengine/build/Code/TEngine/CMakeFiles/TEngine.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/TEngine/CMakeFiles/TEngine.dir/build.make Code/TEngine/CMakeFiles/TEngine.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
make[3]: Nothing to be done for `Code/TEngine/CMakeFiles/TEngine.dir/build'.
make[3]: Leaving directory `/home/loony/git/tengine/build'
/usr/bin/cmake -E cmake_progress_report /home/loony/git/tengine/build/CMakeFiles  82 83 84 85 86 87 88 89 90 91 92 93
[ 53%] Built target TEngine
make -f Code/TEInputSystem/CMakeFiles/TEInputSystem.dir/build.make Code/TEInputSystem/CMakeFiles/TEInputSystem.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/TEInputSystem /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/TEInputSystem /home/loony/git/tengine/build/Code/TEInputSystem/CMakeFiles/TEInputSystem.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/TEInputSystem/CMakeFiles/TEInputSystem.dir/build.make Code/TEInputSystem/CMakeFiles/TEInputSystem.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
make[3]: Nothing to be done for `Code/TEInputSystem/CMakeFiles/TEInputSystem.dir/build'.
make[3]: Leaving directory `/home/loony/git/tengine/build'
/usr/bin/cmake -E cmake_progress_report /home/loony/git/tengine/build/CMakeFiles  47 48 49 50 51
[ 59%] Built target TEInputSystem
make -f Code/TEPhysics/CMakeFiles/TEPhysics.dir/build.make Code/TEPhysics/CMakeFiles/TEPhysics.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/TEPhysics /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/TEPhysics /home/loony/git/tengine/build/Code/TEPhysics/CMakeFiles/TEPhysics.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/TEPhysics/CMakeFiles/TEPhysics.dir/build.make Code/TEPhysics/CMakeFiles/TEPhysics.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
make[3]: Nothing to be done for `Code/TEPhysics/CMakeFiles/TEPhysics.dir/build'.
make[3]: Leaving directory `/home/loony/git/tengine/build'
/usr/bin/cmake -E cmake_progress_report /home/loony/git/tengine/build/CMakeFiles  52 53 54 55
[ 63%] Built target TEPhysics
make -f Code/TERendering/CMakeFiles/TERendering.dir/build.make Code/TERendering/CMakeFiles/TERendering.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/TERendering /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/TERendering /home/loony/git/tengine/build/Code/TERendering/CMakeFiles/TERendering.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/TERendering/CMakeFiles/TERendering.dir/build.make Code/TERendering/CMakeFiles/TERendering.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
make[3]: Nothing to be done for `Code/TERendering/CMakeFiles/TERendering.dir/build'.
make[3]: Leaving directory `/home/loony/git/tengine/build'
/usr/bin/cmake -E cmake_progress_report /home/loony/git/tengine/build/CMakeFiles  58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
[ 86%] Built target TERendering
make -f Code/TEGraphicsSystem/CMakeFiles/TEGraphicsSystem.dir/build.make Code/TEGraphicsSystem/CMakeFiles/TEGraphicsSystem.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/TEGraphicsSystem /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/TEGraphicsSystem /home/loony/git/tengine/build/Code/TEGraphicsSystem/CMakeFiles/TEGraphicsSystem.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/TEGraphicsSystem/CMakeFiles/TEGraphicsSystem.dir/build.make Code/TEGraphicsSystem/CMakeFiles/TEGraphicsSystem.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
make[3]: Nothing to be done for `Code/TEGraphicsSystem/CMakeFiles/TEGraphicsSystem.dir/build'.
make[3]: Leaving directory `/home/loony/git/tengine/build'
/usr/bin/cmake -E cmake_progress_report /home/loony/git/tengine/build/CMakeFiles  41 42 43 44 45 46
[ 93%] Built target TEGraphicsSystem
make -f Code/TETransformSystem/CMakeFiles/TETransformSystem.dir/build.make Code/TETransformSystem/CMakeFiles/TETransformSystem.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/TETransformSystem /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/TETransformSystem /home/loony/git/tengine/build/Code/TETransformSystem/CMakeFiles/TETransformSystem.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/TETransformSystem/CMakeFiles/TETransformSystem.dir/build.make Code/TETransformSystem/CMakeFiles/TETransformSystem.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
make[3]: Nothing to be done for `Code/TETransformSystem/CMakeFiles/TETransformSystem.dir/build'.
make[3]: Leaving directory `/home/loony/git/tengine/build'
/usr/bin/cmake -E cmake_progress_report /home/loony/git/tengine/build/CMakeFiles  79 80 81
[ 96%] Built target TETransformSystem
make -f Code/FightSpace/CMakeFiles/FightSpace.dir/build.make Code/FightSpace/CMakeFiles/FightSpace.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/FightSpace /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/FightSpace /home/loony/git/tengine/build/Code/FightSpace/CMakeFiles/FightSpace.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/FightSpace/CMakeFiles/FightSpace.dir/build.make Code/FightSpace/CMakeFiles/FightSpace.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
Linking CXX executable ../../../Executables/FightSpace
cd /home/loony/git/tengine/build/Code/FightSpace && /usr/bin/cmake -E cmake_link_script CMakeFiles/FightSpace.dir/link.txt --verbose=1
/usr/bin/c++       CMakeFiles/FightSpace.dir/main.cpp.o CMakeFiles/FightSpace.dir/FightSpaceGame.cpp.o CMakeFiles/FightSpace.dir/TEAssetImporter.cpp.o  -o ../../../Executables/FightSpace  -L/opt/boost/lib  -L/usr/lib64/libCg.so  -L/usr/lib64/libCgGL.so  -L/home/loony/git/tengine/Code/FightSpace  -L/home/loony/git/tengine/Code/TECore/Events  -L/home/loony/git/tengine/Code/TECore/Intersection  -L/home/loony/git/tengine/Code/TECore/Math  -L/home/loony/git/tengine/Code/TECore/Network  -L/home/loony/git/tengine/Code/TECore/Resources  -L/home/loony/git/tengine/Code/TECore/IO  -L/home/loony/git/tengine/Code/TECore/Images  -L/home/loony/git/tengine/Code/TECore/Utils  -L/home/loony/git/tengine/Code/TEPhysics/Collision  -L/home/loony/git/tengine/Code/TEPhysics/Physics  -L/home/loony/git/tengine/Code/TEngine/Engine  -L/home/loony/git/tengine/Code/TEPlatform  -L/home/loony/git/tengine/Code/TEPlatform/Win  -L/home/loony/git/tengine/Code/TEPlatform/Linux  -L/home/loony/git/tengine/Code/TEGraphicsSystem  -L/home/loony/git/tengine/Code/TETransformSystem  -L/home/loony/git/tengine/Code/TEInputSystem -rdynamic ../TECore/libTECore.a ../TEngine/libTEngine.a ../TEGraphicsSystem/libTEGraphicsSystem.a ../TEPhysics/libTEPhysics.a ../TETransformSystem/libTETransformSystem.a ../TEPlatform/libTEPlatform.a ../TEInputSystem/libTEInputSystem.a -lCg -lCgGL ../TERendering/libTERendering.a ../../../Externals/glew-1.7.0/lib/glew32.lib -lCg -lCgGL -lGLU -lGL -lSM -lICE -lX11 -lXext ../TEngine/libTEngine.a ../TECore/libTECore.a ../TEPlatform/libTEPlatform.a ../../../Externals/jsoncpp-src-0.5.0/buildscons/linux-gcc-4.7.2/src/lib_json/libjson_linux-gcc-4.7.2_libmt.a -Wl,-rpath,/opt/boost/lib:/usr/lib64/libCg.so:/usr/lib64/libCgGL.so:/home/loony/git/tengine/Code/FightSpace:/home/loony/git/tengine/Code/TECore/Events:/home/loony/git/tengine/Code/TECore/Intersection:/home/loony/git/tengine/Code/TECore/Math:/home/loony/git/tengine/Code/TECore/Network:/home/loony/git/tengine/Code/TECore/Resources:/home/loony/git/tengine/Code/TECore/IO:/home/loony/git/tengine/Code/TECore/Images:/home/loony/git/tengine/Code/TECore/Utils:/home/loony/git/tengine/Code/TEPhysics/Collision:/home/loony/git/tengine/Code/TEPhysics/Physics:/home/loony/git/tengine/Code/TEngine/Engine:/home/loony/git/tengine/Code/TEPlatform:/home/loony/git/tengine/Code/TEPlatform/Win:/home/loony/git/tengine/Code/TEPlatform/Linux:/home/loony/git/tengine/Code/TEGraphicsSystem:/home/loony/git/tengine/Code/TETransformSystem:/home/loony/git/tengine/Code/TEInputSystem
/usr/bin/ld: cannot find -lCg
/usr/bin/ld: cannot find -lCgGL
/usr/bin/ld: cannot find -lCg
/usr/bin/ld: cannot find -lCgGL
collect2: error: ld returned 1 exit status
make[3]: *** [../Executables/FightSpace] Error 1
make[3]: Leaving directory `/home/loony/git/tengine/build'
make[2]: *** [Code/FightSpace/CMakeFiles/FightSpace.dir/all] Error 2
make[2]: Leaving directory `/home/loony/git/tengine/build'
make[1]: *** [Code/FightSpace/CMakeFiles/FightSpace.dir/rule] Error 2
make[1]: Leaving directory `/home/loony/git/tengine/build'
make: *** [FightSpace] Error 2
~/git/tengine/build @ (git::master)
01- 0:30:21 loony@T-linux>

РЕДАКТИРОВАТЬ:

После удаления строк link_directories в файле cmake, предложенных Fraser в ответе ниже, я получаю вместо этого вывод

01- 1:58:59 loony@T-linux> make FightSpace VERBOSE=1
/usr/bin/cmake -H/home/loony/git/tengine -B/home/loony/git/tengine/build --check-build-system CMakeFiles/Makefile.cmake 0
make -f CMakeFiles/Makefile2 FightSpace
make[1]: Entering directory `/home/loony/git/tengine/build'
/usr/bin/cmake -H/home/loony/git/tengine -B/home/loony/git/tengine/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/loony/git/tengine/build/CMakeFiles 91
make -f CMakeFiles/Makefile2 Code/FightSpace/CMakeFiles/FightSpace.dir/all
make[2]: Entering directory `/home/loony/git/tengine/build'
make -f Code/TEPlatform/CMakeFiles/TEPlatform.dir/build.make Code/TEPlatform/CMakeFiles/TEPlatform.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/TEPlatform /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/TEPlatform /home/loony/git/tengine/build/Code/TEPlatform/CMakeFiles/TEPlatform.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/TEPlatform/CMakeFiles/TEPlatform.dir/build.make Code/TEPlatform/CMakeFiles/TEPlatform.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
make[3]: Nothing to be done for `Code/TEPlatform/CMakeFiles/TEPlatform.dir/build'.
make[3]: Leaving directory `/home/loony/git/tengine/build'
/usr/bin/cmake -E cmake_progress_report /home/loony/git/tengine/build/CMakeFiles  57
[  1%] Built target TEPlatform
make -f Code/TECore/CMakeFiles/TECore.dir/build.make Code/TECore/CMakeFiles/TECore.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/TECore /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/TECore /home/loony/git/tengine/build/Code/TECore/CMakeFiles/TECore.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/TECore/CMakeFiles/TECore.dir/build.make Code/TECore/CMakeFiles/TECore.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
make[3]: Nothing to be done for `Code/TECore/CMakeFiles/TECore.dir/build'.
make[3]: Leaving directory `/home/loony/git/tengine/build'
/usr/bin/cmake -E cmake_progress_report /home/loony/git/tengine/build/CMakeFiles  4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
[ 40%] Built target TECore
make -f Code/TEngine/CMakeFiles/TEngine.dir/build.make Code/TEngine/CMakeFiles/TEngine.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/TEngine /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/TEngine /home/loony/git/tengine/build/Code/TEngine/CMakeFiles/TEngine.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/TEngine/CMakeFiles/TEngine.dir/build.make Code/TEngine/CMakeFiles/TEngine.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
make[3]: Nothing to be done for `Code/TEngine/CMakeFiles/TEngine.dir/build'.
make[3]: Leaving directory `/home/loony/git/tengine/build'
/usr/bin/cmake -E cmake_progress_report /home/loony/git/tengine/build/CMakeFiles  82 83 84 85 86 87 88 89 90 91 92 93
[ 53%] Built target TEngine
make -f Code/TETransformSystem/CMakeFiles/TETransformSystem.dir/build.make Code/TETransformSystem/CMakeFiles/TETransformSystem.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/TETransformSystem /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/TETransformSystem /home/loony/git/tengine/build/Code/TETransformSystem/CMakeFiles/TETransformSystem.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/TETransformSystem/CMakeFiles/TETransformSystem.dir/build.make Code/TETransformSystem/CMakeFiles/TETransformSystem.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
make[3]: Nothing to be done for `Code/TETransformSystem/CMakeFiles/TETransformSystem.dir/build'.
make[3]: Leaving directory `/home/loony/git/tengine/build'
/usr/bin/cmake -E cmake_progress_report /home/loony/git/tengine/build/CMakeFiles  79 80 81
[ 57%] Built target TETransformSystem
make -f Code/TEPhysics/CMakeFiles/TEPhysics.dir/build.make Code/TEPhysics/CMakeFiles/TEPhysics.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/TEPhysics /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/TEPhysics /home/loony/git/tengine/build/Code/TEPhysics/CMakeFiles/TEPhysics.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/TEPhysics/CMakeFiles/TEPhysics.dir/build.make Code/TEPhysics/CMakeFiles/TEPhysics.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
make[3]: Nothing to be done for `Code/TEPhysics/CMakeFiles/TEPhysics.dir/build'.
make[3]: Leaving directory `/home/loony/git/tengine/build'
/usr/bin/cmake -E cmake_progress_report /home/loony/git/tengine/build/CMakeFiles  52 53 54 55
[ 61%] Built target TEPhysics
make -f Code/TERendering/CMakeFiles/TERendering.dir/build.make Code/TERendering/CMakeFiles/TERendering.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/TERendering /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/TERendering /home/loony/git/tengine/build/Code/TERendering/CMakeFiles/TERendering.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/TERendering/CMakeFiles/TERendering.dir/build.make Code/TERendering/CMakeFiles/TERendering.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
make[3]: Nothing to be done for `Code/TERendering/CMakeFiles/TERendering.dir/build'.
make[3]: Leaving directory `/home/loony/git/tengine/build'
/usr/bin/cmake -E cmake_progress_report /home/loony/git/tengine/build/CMakeFiles  58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
[ 84%] Built target TERendering
make -f Code/TEGraphicsSystem/CMakeFiles/TEGraphicsSystem.dir/build.make Code/TEGraphicsSystem/CMakeFiles/TEGraphicsSystem.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/TEGraphicsSystem /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/TEGraphicsSystem /home/loony/git/tengine/build/Code/TEGraphicsSystem/CMakeFiles/TEGraphicsSystem.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/TEGraphicsSystem/CMakeFiles/TEGraphicsSystem.dir/build.make Code/TEGraphicsSystem/CMakeFiles/TEGraphicsSystem.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
make[3]: Nothing to be done for `Code/TEGraphicsSystem/CMakeFiles/TEGraphicsSystem.dir/build'.
make[3]: Leaving directory `/home/loony/git/tengine/build'
/usr/bin/cmake -E cmake_progress_report /home/loony/git/tengine/build/CMakeFiles  41 42 43 44 45 46
[ 91%] Built target TEGraphicsSystem
make -f Code/TEInputSystem/CMakeFiles/TEInputSystem.dir/build.make Code/TEInputSystem/CMakeFiles/TEInputSystem.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/TEInputSystem /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/TEInputSystem /home/loony/git/tengine/build/Code/TEInputSystem/CMakeFiles/TEInputSystem.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/TEInputSystem/CMakeFiles/TEInputSystem.dir/build.make Code/TEInputSystem/CMakeFiles/TEInputSystem.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
make[3]: Nothing to be done for `Code/TEInputSystem/CMakeFiles/TEInputSystem.dir/build'.
make[3]: Leaving directory `/home/loony/git/tengine/build'
/usr/bin/cmake -E cmake_progress_report /home/loony/git/tengine/build/CMakeFiles  47 48 49 50 51
[ 96%] Built target TEInputSystem
make -f Code/FightSpace/CMakeFiles/FightSpace.dir/build.make Code/FightSpace/CMakeFiles/FightSpace.dir/depend
make[3]: Entering directory `/home/loony/git/tengine/build'
cd /home/loony/git/tengine/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/loony/git/tengine /home/loony/git/tengine/Code/FightSpace /home/loony/git/tengine/build /home/loony/git/tengine/build/Code/FightSpace /home/loony/git/tengine/build/Code/FightSpace/CMakeFiles/FightSpace.dir/DependInfo.cmake --color=
make[3]: Leaving directory `/home/loony/git/tengine/build'
make -f Code/FightSpace/CMakeFiles/FightSpace.dir/build.make Code/FightSpace/CMakeFiles/FightSpace.dir/build
make[3]: Entering directory `/home/loony/git/tengine/build'
Linking CXX executable ../../../Executables/FightSpace
cd /home/loony/git/tengine/build/Code/FightSpace && /usr/bin/cmake -E cmake_link_script CMakeFiles/FightSpace.dir/link.txt --verbose=1
/usr/bin/c++       CMakeFiles/FightSpace.dir/main.cpp.o CMakeFiles/FightSpace.dir/FightSpaceGame.cpp.o CMakeFiles/FightSpace.dir/TEAssetImporter.cpp.o  -o ../../../Executables/FightSpace  -L/opt/boost/lib  -L/home/loony/git/tengine/Code/FightSpace  -L/home/loony/git/tengine/Code/TECore/Events  -L/home/loony/git/tengine/Code/TECore/Intersection  -L/home/loony/git/tengine/Code/TECore/Math  -L/home/loony/git/tengine/Code/TECore/Network  -L/home/loony/git/tengine/Code/TECore/Resources  -L/home/loony/git/tengine/Code/TECore/IO  -L/home/loony/git/tengine/Code/TECore/Images  -L/home/loony/git/tengine/Code/TECore/Utils  -L/home/loony/git/tengine/Code/TEPhysics/Collision  -L/home/loony/git/tengine/Code/TEPhysics/Physics  -L/home/loony/git/tengine/Code/TEngine/Engine  -L/home/loony/git/tengine/Code/TEPlatform  -L/home/loony/git/tengine/Code/TEPlatform/Win  -L/home/loony/git/tengine/Code/TEPlatform/Linux  -L/home/loony/git/tengine/Code/TEGraphicsSystem  -L/home/loony/git/tengine/Code/TETransformSystem  -L/home/loony/git/tengine/Code/TEInputSystem -rdynamic ../TECore/libTECore.a ../TEngine/libTEngine.a ../TEGraphicsSystem/libTEGraphicsSystem.a ../TEPhysics/libTEPhysics.a ../TETransformSystem/libTETransformSystem.a ../TEPlatform/libTEPlatform.a ../TEInputSystem/libTEInputSystem.a -lCg -lCgGL ../TERendering/libTERendering.a ../../../Externals/glew-1.7.0/lib/glew32.lib -lCg -lCgGL -lGLU -lGL -lSM -lICE -lX11 -lXext ../TEngine/libTEngine.a ../TECore/libTECore.a ../TEPlatform/libTEPlatform.a ../../../Externals/jsoncpp-src-0.5.0/buildscons/linux-gcc-4.7.2/src/lib_json/libjson_linux-gcc-4.7.2_libmt.a -Wl,-rpath,/opt/boost/lib:/home/loony/git/tengine/Code/FightSpace:/home/loony/git/tengine/Code/TECore/Events:/home/loony/git/tengine/Code/TECore/Intersection:/home/loony/git/tengine/Code/TECore/Math:/home/loony/git/tengine/Code/TECore/Network:/home/loony/git/tengine/Code/TECore/Resources:/home/loony/git/tengine/Code/TECore/IO:/home/loony/git/tengine/Code/TECore/Images:/home/loony/git/tengine/Code/TECore/Utils:/home/loony/git/tengine/Code/TEPhysics/Collision:/home/loony/git/tengine/Code/TEPhysics/Physics:/home/loony/git/tengine/Code/TEngine/Engine:/home/loony/git/tengine/Code/TEPlatform:/home/loony/git/tengine/Code/TEPlatform/Win:/home/loony/git/tengine/Code/TEPlatform/Linux:/home/loony/git/tengine/Code/TEGraphicsSystem:/home/loony/git/tengine/Code/TETransformSystem:/home/loony/git/tengine/Code/TEInputSystem
/usr/bin/ld: cannot find -lCg
/usr/bin/ld: cannot find -lCgGL
/usr/bin/ld: cannot find -lCg
/usr/bin/ld: cannot find -lCgGL
collect2: error: ld returned 1 exit status
make[3]: *** [../Executables/FightSpace] Error 1
make[3]: Leaving directory `/home/loony/git/tengine/build'
make[2]: *** [Code/FightSpace/CMakeFiles/FightSpace.dir/all] Error 2
make[2]: Leaving directory `/home/loony/git/tengine/build'
make[1]: *** [Code/FightSpace/CMakeFiles/FightSpace.dir/rule] Error 2
make[1]: Leaving directory `/home/loony/git/tengine/build'
make: *** [FightSpace] Error 2
~/git/tengine/build @ (git::master)
01- 1:59:08 loony@T-linux>

0

Решение

Следующая часть выглядит подозрительно:

-L/usr/lib64/libCg.so  -L/usr/lib64/libCgGL.so

-L должен следовать путь к каталогу, который будет искать компоновщик при поиске последующих библиотек, указанных через -l,

Я ожидаю, что это будет -L/usr/lib64 в этом случае.

Вы уверены, что включаете ${CG_LIBRARY} а также ${CG_GL_LIBRARY} в target_link_libraries позвони а не link_directories позвонить по ошибке?


редактировать

Основываясь на комментариях ниже, вы можете сделать следующее, чтобы все заработало:

get_filename_component(CgLibPath ${CG_LIBRARY} PATH)
get_filename_component(CgGlLibPath ${CG_GL_LIBRARY} PATH)
link_directories(${CgLibPath} ${CgGlLibPath})

Это должно работать, но учтите, что использование link_directories не рекомендуется даже в собственной документации.

0

Другие решения

Других решений пока нет …

По вопросам рекламы [email protected]