Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 3, 2009, 8:28:37 PM (16 years ago)
Author:
rgrieder
Message:

Added new CMake functions: ORXONOX_ADD_LIBRARY and ORXONOX_ADD_EXECUTABLE.
They replace the current functions ADD_LIBRARY and ADD_EXECUTABLE to allow for clearer and easier declaration.
And it allows for GCC precompiled header file support in the first place ;)
More information can be found in TargetUtilities.cmake

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pch/src/util/CMakeLists.txt

    r3089 r3116  
    5252  SubString.cc
    5353)
    54 #GET_ALL_HEADER_FILES(UTIL_HDR_FILES)
    55 #SET(UTIL_FILES ${UTIL_SRC_FILES} ${UTIL_HDR_FILES})
    56 GENERATE_SOURCE_GROUPS(${UTIL_FILES})
    57 # Also add OrxonoxConfig to have it least somewhere in the IDE
    58 LIST(APPEND UTIL_FILES
    59   ${CMAKE_BINARY_DIR}/src/OrxonoxConfig.h
    60   ${CMAKE_SOURCE_DIR}/src/OrxonoxConfig.h.in
    61   ${CMAKE_BINARY_DIR}/src/SpecialConfig.h
    62   ${CMAKE_SOURCE_DIR}/src/SpecialConfig.h.in
    63 )
    64 SOURCE_GROUP("" FILES
    65   ${CMAKE_BINARY_DIR}/src/OrxonoxConfig.h
    66   ${CMAKE_SOURCE_DIR}/src/OrxonoxConfig.h.in
    67   ${CMAKE_BINARY_DIR}/src/SpecialConfig.h
    68   ${CMAKE_SOURCE_DIR}/src/SpecialConfig.h.in
    69 )
    7054
    7155IF(GCC_NO_SYSTEM_HEADER_SUPPORT)
     
    7458ENDIF()
    7559
    76 ADD_LIBRARY(util SHARED ${UTIL_FILES})
    77 SET_TARGET_PROPERTIES(util PROPERTIES DEFINE_SYMBOL "UTIL_SHARED_BUILD")
    78 TARGET_LINK_LIBRARIES(util ${OGRE_LIBRARY})
    79 
    80 ORXONOX_INSTALL(util)
     60ORXONOX_ADD_LIBRARY(util
     61  #FIND_HEADER_FILES
     62  DEFINE_SYMBOL
     63    "UTIL_SHARED_BUILD"
     64  LINK_LIBRARIES
     65    ${OGRE_LIBRARY}
     66  SOURCE_FILES
     67    ${UTIL_FILES}
     68)
Note: See TracChangeset for help on using the changeset viewer.