Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes in / [20:30]


Ignore:
Location:
/code/branches/tutorial/Tutorial
Files:
862 added
4 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • /code/branches/tutorial/Tutorial/CMakeLists.txt

    r20 r30  
    1 PROJECT (Tutorial)
     1PROJECT(Tutorial)
    22
    3 SET (MAIN_SRC main.cpp)
     3SET(SRC_FILES src/main.cpp)
    44
    5 ADD_EXECUTABLE (main ${MAIN_SRC})
     5SET(INC_FILES src/ExampleApplication.h  src/ExampleFrameListener.h  src/ExampleLoadingBar.h)
    66
    7 # find OGRE
    8 FIND_LIBRARY (OGRE_LIBS NAMES OGRE
    9   PATH /usr/lib /usr/local/lib /usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib/pkgconfig)
    10 IF (OGRE_LIBS)
    11   TARGET_ADD_LIBRARY (main OGRE_LIBS)
    12   TARGET_LINK_LIBRARIES (main OGRE_LIBS)
    13 ENDIF (OGRE_LIBS)
     7#This sets where to look for "Find*.cmake" files
     8SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
     9#Performs the search and sets the variables
     10FIND_PACKAGE(OGRE)
     11FIND_PACKAGE(OIS)
    1412
    15 # find OIS
    16 FIND_LIBRARY (OIS_LIBS NAMES OIS
    17   PATH /usr/lib /usr/local/lib /usr/pack/ois-1.0-sd/i686-debian-linux3.1/lib/pkgconfig)
    18 IF (OIS_LIBS)
    19   ADD_LIBRARY (OIS_LIBS)
    20   TARGET_LINK_LIBRARIES (main OIS_LIBS)
    21 ENDIF (OIS_LIBS)
     13#Sets the search paths for the linking
     14LINK_DIRECTORIES(${OGRE_LIB_DIR} ${OIS_LIB_DIR})
     15#Sets the search path for include files
     16INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR})
    2217
    23 INCLUDE_DIRECTORIES (. /usr/pack/ois-1.0-sd/i686-debian-linux3.1/include /usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/include)
     18#Creates an executable
     19ADD_EXECUTABLE(build/main ${SRC_FILES} ${INC_FILES})
     20#Links the executable against Ogre
     21TARGET_LINK_LIBRARIES(build/main ${OGRE_LIBRARIES} ${OIS_LIBRARIES})
     22
     23#Sets the install path
     24INSTALL(TARGETS build/main DESTINATION bin)
Note: See TracChangeset for help on using the changeset viewer.