Rev | Line | |
---|
[30] | 1 | PROJECT(Tutorial) |
---|
[12] | 2 | |
---|
[39] | 3 | CMAKE_CXX_COMPILER(CC="gcc-3.4 gcc-4.1.2 gcc" CXX="g++-3.4 g++-4.1.2 g++") |
---|
| 4 | |
---|
[30] | 5 | SET(SRC_FILES src/main.cpp) |
---|
[12] | 6 | |
---|
[30] | 7 | SET(INC_FILES src/ExampleApplication.h src/ExampleFrameListener.h src/ExampleLoadingBar.h) |
---|
[12] | 8 | |
---|
[30] | 9 | #This sets where to look for "Find*.cmake" files |
---|
| 10 | SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) |
---|
| 11 | #Performs the search and sets the variables |
---|
| 12 | FIND_PACKAGE(OGRE) |
---|
| 13 | FIND_PACKAGE(OIS) |
---|
[14] | 14 | |
---|
[30] | 15 | #Sets the search paths for the linking |
---|
| 16 | LINK_DIRECTORIES(${OGRE_LIB_DIR} ${OIS_LIB_DIR}) |
---|
| 17 | #Sets the search path for include files |
---|
| 18 | INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR}) |
---|
[14] | 19 | |
---|
[30] | 20 | #Creates an executable |
---|
[33] | 21 | ADD_EXECUTABLE(main ${SRC_FILES} ${INC_FILES}) |
---|
[30] | 22 | #Links the executable against Ogre |
---|
[33] | 23 | TARGET_LINK_LIBRARIES(main ${OGRE_LIBRARIES} ${OIS_LIBRARIES}) |
---|
[30] | 24 | |
---|
| 25 | #Sets the install path |
---|
[39] | 26 | INSTALL(TARGETS main DESTINATION bin) |
---|
Note: See
TracBrowser
for help on using the repository browser.