Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 30 for code/branches/tutorial


Ignore:
Timestamp:
Oct 10, 2007, 11:28:50 PM (17 years ago)
Author:
nicolasc
Message:

used cmake
included a resonable base structure

Location:
code/branches/tutorial/Tutorial
Files:
4 added
1 deleted
1 edited
1 copied
8 moved

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.