Ogre Error In Cmake -
Ogre Error In Cmake -
while implementing cmake in code getting ogre error:
/usr/bin/ld: cannot find -logre
my cmakelists.txt file looks like:
#specify version beingness used aswell language cmake_minimum_required(version 2.6) #name project here project(ecad) #sets cmake run moc when needed set(cmake_automoc on) #find requirements of projects find_package(qt5widgets) find_package(qt5core) find_package(ogre) find_package(ois) # find includes in corresponding build directories set(cmake_include_current_dir on) #sends -std=c++11 flag gcc compiler add_definitions(-std=c++11) qt5_wrap_ui(cmake_form_hdr resources/ui/mainwindow.ui) #this tells cmake main.cpp , name ecad add_executable(ecad main.cpp ${cmake_form_hdr}) #include subdirectory containing our libs add_subdirectory (gui) include_directories(gui) #link_libraries target_link_libraries(ecad qt5::widgets qt5::core ogre ois)
i new this. please help me out solve problem
the command find_package(ogre)
runs file findogre.cmake
, sets variables ogre_include_dirs
, ogre_libraries
. link ogre
library, should utilize these variables, e.g.
target_include_directories(ecad private ${ogre_include_dirs})
target_link_libraries(ecad ${ogre_libraries})
this same of external libraries use.
cmake
Comments
Post a Comment