Line | |
---|
1 | PROJECT(Tutorial) |
---|
2 | |
---|
3 | CMAKE_CXX_COMPILER(CC="gcc-3.4 gcc-4.1.2 gcc" CXX="g++-3.4 g++-4.1.2 g++") |
---|
4 | |
---|
5 | SET(SRC_FILES src/main.cpp) |
---|
6 | |
---|
7 | SET(INC_FILES src/ExampleApplication.h src/ExampleFrameListener.h src/ExampleLoadingBar.h) |
---|
8 | |
---|
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 | |
---|
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}) |
---|
19 | |
---|
20 | #Creates an executable |
---|
21 | ADD_EXECUTABLE(main ${SRC_FILES} ${INC_FILES}) |
---|
22 | #Links the executable against Ogre |
---|
23 | TARGET_LINK_LIBRARIES(main ${OGRE_LIBRARIES} ${OIS_LIBRARIES}) |
---|
24 | |
---|
25 | #Sets the install path |
---|
26 | INSTALL(TARGETS main DESTINATION bin) |
---|
Note: See
TracBrowser
for help on using the repository browser.