Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 11, 2010, 8:20:30 PM (14 years ago)
Author:
rgrieder
Message:

Placing all generated files in source group "Generated" for MSVC instead of different groups for PCH, Tolua and Compilations.

Location:
code/trunk/cmake/tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/cmake/tools/GenerateToluaBindings.cmake

    r7163 r7415  
    4747    PARENT_SCOPE
    4848  )
    49   SOURCE_GROUP("Tolua" FILES ${_tolua_cxxfile} ${_tolua_hfile})
     49
    5050  # Disable annoying GCC warnings
    5151  IF(CMAKE_COMPILER_IS_GNU)
    5252    SET_SOURCE_FILES_PROPERTIES(${_tolua_cxxfile} PROPERTIES COMPILE_FLAGS "-w")
    5353  ENDIF()
     54
    5455  # Tolua binding speedup if required
    5556  IF(ORXONOX_RELEASE)
  • code/trunk/cmake/tools/SourceFileUtilities.cmake

    r7173 r7415  
    118118      SOURCE_GROUP("Source\\${_group_path}" FILES ${_file})
    119119    ELSE()
    120       # Has to be a compilation
    121       SOURCE_GROUP("Compilations" FILES ${_file})
     120      # File is being generated in the binary directory
     121      SOURCE_GROUP("Generated" FILES ${_file})
    122122    ENDIF()
    123123  ENDFOREACH(_file)
  • code/trunk/cmake/tools/TargetUtilities.cmake

    r7401 r7415  
    8484                  NO_DLL_INTERFACE   NO_SOURCE_GROUPS  PCH_NO_DEFAULT
    8585                  NO_INSTALL         NO_VERSION        ${_additional_switches})
    86   SET(_list_names LINK_LIBRARIES  VERSION   SOURCE_FILES  DEFINE_SYMBOL
    87                   TOLUA_FILES     PCH_FILE  PCH_EXCLUDE   OUTPUT_NAME)
     86  SET(_list_names LINK_LIBRARIES     VERSION           SOURCE_FILES
     87                  DEFINE_SYMBOL      TOLUA_FILES       PCH_FILE
     88                  PCH_EXCLUDE        OUTPUT_NAME)
     89
    8890  PARSE_MACRO_ARGUMENTS("${_switches}" "${_list_names}" ${ARGN})
    8991
     
    105107  ENDIF()
    106108
     109  # Combine source and header files
     110  SET(_${_target_name}_files
     111    ${_${_target_name}_header_files}
     112    ${_${_target_name}_source_files}
     113  )
    107114  # Remove potential duplicates
    108   SET(_${_target_name}_files ${_${_target_name}_header_files} ${_${_target_name}_source_files})
    109115  LIST(REMOVE_DUPLICATES _${_target_name}_files)
    110 
    111   # Generate the source groups
    112   IF(NOT _arg_NO_SOURCE_GROUPS)
    113     GENERATE_SOURCE_GROUPS(${_${_target_name}_files})
    114 
    115     IF(NOT _arg_ORXONOX_EXTERNAL)
    116       # Move the prereqs.h file to the config section
    117       IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_target_name_capitalised}Prereqs.h)
    118         SOURCE_GROUP("Config" FILES ${_target_name_capitalised}Prereqs.h)
    119       ENDIF()
    120       # Add the config files in a special source group
    121       LIST(APPEND _${_target_name}_files ${ORXONOX_CONFIG_FILES})
    122       SOURCE_GROUP("Config" FILES ${ORXONOX_CONFIG_FILES})
    123     ENDIF()
    124   ENDIF(NOT _arg_NO_SOURCE_GROUPS)
    125116
    126117  # TOLUA_FILES
     
    145136    ENDIF()
    146137  ENDIF()
     138
     139  # Generate the source groups
     140  IF(MSVC AND NOT _arg_NO_SOURCE_GROUPS)
     141    GENERATE_SOURCE_GROUPS(${_${_target_name}_files})
     142
     143    IF(NOT _arg_ORXONOX_EXTERNAL)
     144      # Move the prereqs.h file to the config section
     145      IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_target_name_capitalised}Prereqs.h)
     146        SOURCE_GROUP("Config" FILES ${_target_name_capitalised}Prereqs.h)
     147      ENDIF()
     148      # Add config files to the config section
     149      LIST(APPEND _${_target_name}_files ${ORXONOX_CONFIG_FILES})
     150      SOURCE_GROUP("Config" FILES ${ORXONOX_CONFIG_FILES})
     151    ENDIF()
     152  ENDIF(NOT _arg_NO_SOURCE_GROUPS)
    147153
    148154  # Set link mode (SHARED/STATIC)
Note: See TracChangeset for help on using the changeset viewer.