1. Shankar Giri
  2. Ogitor_girivs

Commits

Michaël Broutin  committed 139d8cc

Added Unity build to (almost) all projects in the solution.

  • Participants
  • Parent commits bc22322
  • Branches default

Comments (0)

Files changed (30)

File CMakeLists.txt

View file
  • Ignore whitespace
 file(MAKE_DIRECTORY ${OGITOR_WORK_DIR}/RunPath/Plugins/debug)
 file(MAKE_DIRECTORY ${OGITOR_WORK_DIR}/RunPath/bin)
 
+# Unity build options
+# A Unity build includes all sources files in just a few actual compilation units
+# to potentially speed up the compilation.
+option(OGITOR_UNITY_BUILD "Enable unity build for Ogitor." FALSE)
+set(OGITOR_UNITY_FILES_PER_UNIT "50" CACHE STRING "Number of files per compilation unit in Unity build.")
+
 # configure global paths for OgitorsGlobals
 if(UNIX)
     set(DBG_POSTFIX "")

File CMakeModules/OgreAddTargets.cmake

View file
  • Ignore whitespace
+#-------------------------------------------------------------------
+# This file is part of the CMake build system for OGRE
+#     (Object-oriented Graphics Rendering Engine)
+# For the latest info, see http://www.ogre3d.org/
+#
+# The contents of this file are placed in the public domain. Feel
+# free to make use of it in any way you like.
+#-------------------------------------------------------------------
+
+# check the contents of a given source file. If they differ from the
+# expected content, or the file does not exist, rewrite it with the
+# provided content.
+# This function is used in order to update Unity build files only when
+# necessary. If we rewrote them unconditionally, it might trigger an
+# unnecessary rebuild of the file.
+function(check_and_update_file FILENAME CONTENT)
+  # read current file contents
+  if (EXISTS ${FILENAME})
+    file(READ ${FILENAME} _CUR)
+  else ()
+    # create empty file
+    file(WRITE ${FILENAME} "")
+    set(_CUR "")
+  endif ()
+  if (NOT _CUR STREQUAL CONTENT)
+    # rewrite file with new contents
+    message(STATUS "  Updating ${FILENAME}...")
+    file(WRITE ${FILENAME} ${CONTENT})
+  else ()
+    message(STATUS "  ${FILENAME} is up to date.")
+  endif ()
+endfunction()
+
+
+# generate unity build files for the given target.
+# If in the list of source files the key word SEPARATE is specified, then
+# any source file after that will be compiled separately.
+macro(create_unity_build_files TARGETNAME)
+  # first step: build the primary and separate lists
+  set(_PRIMARY "")
+  set(_EXCLUDES "")
+  set(_SEP FALSE)
+  foreach(_FILE ${ARGN})
+    if (_FILE STREQUAL "SEPARATE")
+      set(_SEP TRUE)
+    else ()
+      if (_SEP)
+        list(APPEND _EXCLUDES ${_FILE})
+      else ()
+        list(APPEND _PRIMARY ${_FILE})
+      endif ()
+    endif()
+  endforeach()
+  set(_SOURCES ${_PRIMARY} ${_EXCLUDES})
+  list(REMOVE_DUPLICATES _SOURCES)
+
+  if (OGITOR_UNITY_BUILD)
+    include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+    # create Unity compilation units
+    # all source files given will be put into a certain number of
+    # compilation units.
+    # if certain source files should be excluded from the unity build
+    # and built separately, they need to also be named in the SEPARATE
+    # list.
+    set(_FILE_NUM 0)
+    set(_FILE_CNT 0)
+    set(_FILE_CONTENTS "")
+    message(STATUS "Creating Unity build files for target ${TARGETNAME}")
+    foreach(_FILE ${_PRIMARY})
+      # test if file is more than just a header
+      get_filename_component(_EXT ${_FILE} EXT)
+      list(FIND _EXCLUDES ${_FILE} _EXCLUDED)
+      if ((_EXT STREQUAL ".cpp") AND (_EXCLUDED EQUAL "-1"))
+        set(_FILE_CONTENTS "${_FILE_CONTENTS}\#include \"${_FILE}\"\n")
+        math(EXPR _FILE_CNT "${_FILE_CNT}+1")
+        if(_FILE_CNT EQUAL OGITOR_UNITY_FILES_PER_UNIT)
+          set(_FILENAME "${Ogitor_BINARY_DIR}/${TARGETNAME}/compile_${TARGETNAME}_${_FILE_NUM}.cpp")
+          check_and_update_file(${_FILENAME} ${_FILE_CONTENTS})
+          math(EXPR _FILE_NUM "${_FILE_NUM}+1")
+          set(_FILE_CNT 0)
+          set (_FILE_CONTENTS "")
+          list(APPEND _SOURCES ${_FILENAME})
+        endif()
+        # exclude the original source file from the compilation
+        set_source_files_properties(${_FILE} PROPERTIES LANGUAGE "" HEADER_FILE_ONLY TRUE)
+      endif()
+    endforeach()
+    # don't forget the last set of files
+    set(_FILENAME "${Ogitor_BINARY_DIR}/${TARGETNAME}/compile_${TARGETNAME}_${_FILE_NUM}.cpp")
+    check_and_update_file(${_FILENAME} ${_FILE_CONTENTS})
+    list(APPEND _SOURCES ${_FILENAME})
+  endif ()
+endmacro()
+
+
+# add a new library target
+# usage: ogitor_add_library(TARGETNAME LIBTYPE SOURCE_FILES [SEPARATE SOURCE_FILES])
+function(ogitor_add_library TARGETNAME LIBTYPE)
+  create_unity_build_files(${TARGETNAME} ${ARGN})
+  add_library(${TARGETNAME} ${LIBTYPE} ${_SOURCES})
+endfunction(ogitor_add_library)
+
+
+# add a new executable target
+# usage: ogitor_add_executable(TARGETNAME [WIN32] [MACOSX_BUNDLE] SOURCE_FILES [SEPARATE SOURCE_FILES])
+function(ogitor_add_executable TARGETNAME)
+  # test if WIN32 or MACOSX_BUNDLE options were provided
+  set(_WIN32 "")
+  set(_OSX "")
+  list(FIND ARGN "WIN32" _W32_IDX)
+  if (_W32_IDX GREATER "-1")
+    set(_WIN32 "WIN32")
+    list(REMOVE_AT ARGN ${_W32_IDX})
+  endif ()
+  list(FIND ARGN "MACOSX_BUNDLE" _OSX_IDX)
+  if (_OSX_IDX GREATER "-1")
+    set(_OSX "MACOSX_BUNDLE")
+    list(REMOVE_AT ARGN ${_OSX_IDX})
+  endif ()
+  create_unity_build_files(${TARGETNAME} ${ARGN})
+  add_executable(${TARGETNAME} ${_WIN32} ${_OSX} ${_SOURCES})
+endfunction()

File CMakeModules/PrecompiledHeader.cmake

View file
  • Ignore whitespace
   get_filename_component(HEADER ${HEADER_FILE} NAME)
 
   # Use MSVC_IDE to exclude NMake from using PCHs
-  if (MSVC AND NOT NMAKE AND NOT OGRE_UNITY_BUILD)
+  if (MSVC AND NOT NMAKE AND NOT OGITOR_UNITY_BUILD)
 	add_definitions(/Yu"${HEADER}")
     set_source_files_properties(${SRC_FILE}
       PPROPERTIES COMPILE_FLAGS /Yc"${HEADER}"

File Dependencies/Angelscript/CMakeLists.txt

View file
  • Ignore whitespace
 	endif()
 endif()
 
-add_library(Angelscript STATIC ${ANGELSCRIPT_ADDON_SOURCE} ${ANGELSCRIPT_ADDON_HEADERS} ${ANGELSCRIPT_SOURCE} ${ANGELSCRIPT_HEADERS})
+ogitor_add_library(Angelscript STATIC ${ANGELSCRIPT_ADDON_SOURCE} ${ANGELSCRIPT_ADDON_HEADERS} ${ANGELSCRIPT_SOURCE} ${ANGELSCRIPT_HEADERS})
 set(LIBRARY_OUTPUT_PATH  ../lib)
 
 if(WIN32)

File Dependencies/Angelscript/add_on/vector3/as_ScriptOgreVector3.cpp

View file
  • Ignore whitespace
 		new(self) Ogre::Vector2(Ogre::Real(x), Ogre::Real(y));
 	}
 
-    static void Vector3DefaultConstructor(Ogre::Vector3 *self)
+    static void OgreVector3DefaultConstructor(Ogre::Vector3 *self)
 	{
 		new(self) Ogre::Vector3();
 	}
 
-	static void Vector3InitConstructor(float x, float y, float z, Ogre::Vector3 *self)
+	static void OgreVector3InitConstructor(float x, float y, float z, Ogre::Vector3 *self)
 	{
 		new(self) Ogre::Vector3(Ogre::Real(x), Ogre::Real(y), Ogre::Real(z));
 	}
 		r = engine->RegisterObjectProperty("Vector3", "float z", offsetof(Ogre::Vector3, z)); assert( r >= 0 );
 
 
-	    r = engine->RegisterObjectBehaviour("Vector3", asBEHAVE_CONSTRUCT,  "void f()",                     asFUNCTION(Vector3DefaultConstructor), asCALL_CDECL_OBJLAST); assert( r >= 0 );
+	    r = engine->RegisterObjectBehaviour("Vector3", asBEHAVE_CONSTRUCT,  "void f()",                     asFUNCTION(OgreVector3DefaultConstructor), asCALL_CDECL_OBJLAST); assert( r >= 0 );
         r = engine->RegisterObjectBehaviour("Vector3", asBEHAVE_CONSTRUCT,  "void f(const Vector3 &in)",    asFUNCTION(CopyConstructVector3), asCALL_CDECL_OBJLAST); assert( r >= 0 );
-		r = engine->RegisterObjectBehaviour("Vector3", asBEHAVE_CONSTRUCT,  "void f(float, float, float)",	asFUNCTION(Vector3InitConstructor),	asCALL_CDECL_OBJLAST); assert(r >= 0);
+		r = engine->RegisterObjectBehaviour("Vector3", asBEHAVE_CONSTRUCT,  "void f(float, float, float)",	asFUNCTION(OgreVector3InitConstructor),	asCALL_CDECL_OBJLAST); assert(r >= 0);
 
 
 /*        r = engine->RegisterObjectMethod("Vector3", "Vector3 &opAssign(Vector3&in)", asFUNCTION(Vector3Assignment), asCALL_CDECL_OBJLAST); assert( r >= 0 );*/

File Dependencies/Caelum-0.5.0/main/CMakeLists.txt

View file
  • Ignore whitespace
 #include_directories ( ${OGITOR_SM_INCLUDES} )
 link_libraries(Caelum  ${OGRE_LIBRARIES} ${Boost_LIBRARIES})
 
-add_library(Caelum SHARED ${HEADER_FILES} ${SOURCE_FILES})
+ogitor_add_library(Caelum SHARED ${HEADER_FILES} ${SOURCE_FILES})
 set(LIBRARY_OUTPUT_PATH  ../../lib)
 
 set_target_properties(Caelum PROPERTIES INSTALL_RPATH ${OGRE_INSTALL_DIR}/lib/OGRE)

File Dependencies/GenericImageEditor/CMakeLists.txt

View file
  • Ignore whitespace
     include_directories(../ImageConverter/include)
 
     link_libraries(${QT_QTMAIN_LIBRARY} ${QT_LIBRARIES} OFS Ogitor ImageConverter)
-    add_library(GenericImageEditor SHARED ${SRCS})
+    ogitor_add_library(GenericImageEditor SHARED ${SRCS})
     set(LIBRARY_OUTPUT_PATH ../lib)
 
 	add_dependencies(GenericImageEditor OFS)

File Dependencies/GenericTextEditor/CMakeLists.txt

View file
  • Ignore whitespace
         include_directories(../OFS/include)
 
     link_libraries(${QT_QTMAIN_LIBRARY} ${QT_LIBRARIES} OFS Ogitor)
-    add_library(GenericTextEditor SHARED ${SRCS})
+    ogitor_add_library(GenericTextEditor SHARED ${SRCS})
     set(LIBRARY_OUTPUT_PATH ../lib)
 
     add_dependencies(GenericTextEditor OFS)

File Dependencies/HYDRAX/Hydrax/src/Hydrax/CMakeLists.txt

View file
  • Ignore whitespace
 # Terrain Scene Manager
 #include_directories ( ${OGITOR_SM_INCLUDES} )
 
-add_library(Hydrax SHARED ${HEADER_FILES} ${SOURCE_FILES}  )
+ogitor_add_library(Hydrax SHARED ${HEADER_FILES} ${SOURCE_FILES}  )
 SET(LIBRARY_OUTPUT_PATH  ../../../../lib)
 
 set_target_properties(PROPERTIES

File Dependencies/HYDRAX/Hydrax/src/Hydrax/Image.cpp

View file
  • Ignore whitespace
 
 namespace Hydrax
 {
-	Image::Image(const Size &Size)
-		: mSize(Hydrax::Size(Size.Width+1,Size.Height+1))
+	Image::Image(const Size &size)
+		: mSize(Size(size.Width+1,size.Height+1))
 		, mChannels(static_cast<int>(TYPE_RGBA))
 		, mData(0)
 	{
 		_Initialize(0);
 	}
 
-	Image::Image(const Size &Size, const Type &Type)
-		: mSize(Hydrax::Size(Size.Width+1,Size.Height+1))
+	Image::Image(const Size &size, const Type &Type)
+		: mSize(Size(size.Width+1,size.Height+1))
 		, mChannels(static_cast<int>(Type))
 		, mData(0)
 	{
 		_Initialize(0);
 	}
 
-	Image::Image(const Size &Size, const Type &Type, const float &v)
-		: mSize(Hydrax::Size(Size.Width+1,Size.Height+1))
+	Image::Image(const Size &size, const Type &Type, const float &v)
+		: mSize(Size(size.Width+1,size.Height+1))
 		, mChannels(static_cast<int>(Type))
 		, mData(0)
 	{

File Dependencies/ImageConverter/CMakeLists.txt

View file
  • Ignore whitespace
     include_directories(${OGITOR_INCLUDES})
 
     link_libraries(${QT_QTMAIN_LIBRARY} ${QT_LIBRARIES} Ogitor)
-    add_library(ImageConverter SHARED ${SRCS})
+    ogitor_add_library(ImageConverter SHARED ${SRCS})
     set(LIBRARY_OUTPUT_PATH ../lib)
 
     if(NOT OGITOR_DIST)

File Dependencies/MeshMagick/CMakeLists.txt

View file
  • Ignore whitespace
 
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${OGRE_INCLUDE_DIRS})
 
-add_library(meshmagick_shared_lib SHARED ${MESHMAGICK_SOURCE} ${MESHMAGICK_HEADERS})
+ogitor_add_library(meshmagick_shared_lib SHARED ${MESHMAGICK_SOURCE} ${MESHMAGICK_HEADERS})
 set(LIBRARY_OUTPUT_PATH  ../lib)
 set_target_properties(meshmagick_shared_lib PROPERTIES
 	OUTPUT_NAME meshmagick

File Dependencies/OFS/CMakeLists.txt

View file
  • Ignore whitespace
 
 include_directories(${Boost_INCLUDE_DIR})
 
-add_library(OFS SHARED ${OFS_SOURCE} ${OFS_HEADERS})
+ogitor_add_library(OFS SHARED ${OFS_SOURCE} ${OFS_HEADERS})
 
 target_link_libraries(OFS ${Boost_LIBRARIES})
 

File Dependencies/PagedGeometry/CMakeLists.txt

View file
  • Ignore whitespace
 	set(CMAKE_CXX_FLAGS -fPIC)
 endif(UNIX)
 
-add_library(PagedGeometry ${HEADER_FILES} ${SOURCE_FILES}  )
+ogitor_add_library(PagedGeometry ${HEADER_FILES} ${SOURCE_FILES}  )
 set(LIBRARY_OUTPUT_PATH  ../lib)
 
 set_target_properties(PagedGeometry PROPERTIES INSTALL_RPATH ${OGRE_INSTALL_DIR}/lib/OGRE)

File Dependencies/PagedGeometry/source/BatchedGeometry.cpp

View file
  • Ignore whitespace
 #include <string>
 using namespace Ogre;
 
-#ifndef max
-#define max(a,b)            (((a) > (b)) ? (a) : (b))
-#endif
-
-
 namespace Forests {
 
 //-------------------------------------------------------------------------------------
 		//Calculate camera distance
 		Vector3 camVec = _convertToLocal(cam->getDerivedPosition()) - center;
 		Real centerDistanceSquared = camVec.squaredLength();
-		minDistanceSquared = max(0.0f, centerDistanceSquared - (radius * radius));
+		minDistanceSquared = std::max(0.0f, centerDistanceSquared - (radius * radius));
 		//Note: centerDistanceSquared measures the distance between the camera and the center of the GeomBatch,
 		//while minDistanceSquared measures the closest distance between the camera and the closest edge of the
 		//geometry's bounding sphere.

File Dependencies/SkyX/CMakeLists.txt

View file
  • Ignore whitespace
 set(SKYX_VERSION_PATCH "0")
 set(SKYX_VERSION "${SKYX_VERSION_MAJOR}.${SKYX_VERSION_MINOR}.${SKYX_VERSION_PATCH}")
 
-add_library(Skyx SHARED ${HEADER_FILES} ${SOURCE_FILES})
+ogitor_add_library(Skyx SHARED ${HEADER_FILES} ${SOURCE_FILES})
 set(LIBRARY_OUTPUT_PATH  ../lib)
 
 include_directories("${CMAKE_CURRENT_SOURCE_DIR}")

File Dependencies/lua/CMakeLists.txt

View file
  • Ignore whitespace
 	SET(LUA_LINKER_FLAGS "m;dl;${LUA_LINKER_FLAGS}")
 ENDIF(CMAKE_SYSTEM MATCHES "Linux.*")
 
-ADD_LIBRARY(lua_library_static STATIC ${PUBLIC_HEADERS} ${LUA_STANDARD_LIBRARY} ${LUA_CORE} ${RESOURCE_FILES})
+ogitor_add_library(lua_library_static STATIC ${PUBLIC_HEADERS} ${LUA_STANDARD_LIBRARY} ${LUA_CORE} ${RESOURCE_FILES})
 
 SET_TARGET_PROPERTIES(lua_library_static PROPERTIES OUTPUT_NAME "lua")
 SET_TARGET_PROPERTIES(lua_library_static PROPERTIES COMPILE_FLAGS "${LUA_C_FLAGS}")

File Ogitor/CMakeLists.txt

View file
  • Ignore whitespace
 include_directories(include)
 
 include(PrecompiledHeader)
+include(OgreAddTargets)
 
 set(Ogitor_hdrs
 	./include/AxisGizmo.h
 	${OGITOR_WORK_DIR}/Ogitor/src/OgitorsGlobals.cpp	
 )
 
-add_library(Ogitor SHARED ${Ogitor_hdrs} ${Ogitor_srcs})
+#add_library(Ogitor SHARED ${Ogitor_hdrs} ${Ogitor_srcs})
+ogitor_add_library(Ogitor SHARED ${Ogitor_hdrs} ${Ogitor_srcs})
 set(LIBRARY_OUTPUT_PATH ../lib)
 
 

File Ogitor/src/CameraVisualHelper.cpp

View file
  • Ignore whitespace
 
 
 // number of indices we will use
-const size_t         gEstimateIndexCount     = 0;
+const size_t         gCameraEstimateIndexCount     = 0;
 
 // number of vertices we will draw (2 quads and 4 conecting lines)
-const size_t         gEstimatedVertexCount   = 2 * 4 + 4 * 2;
+const size_t         gCameraEstimatedVertexCount   = 2 * 4 + 4 * 2;
 
 // constructor
 CCameraVisualHelper::CCameraVisualHelper(CBaseEditor *parent)
     mSceneManager = parent->getSceneManager();
     // create our manual object and set initial values
     mVisualHelperObject =  mSceneManager->createManualObject("CVH" + parent->getName());
-    mVisualHelperObject->estimateIndexCount(gEstimateIndexCount);
-    mVisualHelperObject->estimateVertexCount(gEstimatedVertexCount);
+    mVisualHelperObject->estimateIndexCount(gCameraEstimateIndexCount);
+    mVisualHelperObject->estimateVertexCount(gCameraEstimatedVertexCount);
     mVisualHelperObject->setDynamic(true);
 
     // create a material for the visual representation

File Ogitor/src/OgitorsClipboardManager.cpp

View file
  • Ignore whitespace
 
 using namespace Ogitors;
 
-template<> OgitorsClipboardManager* Singleton<OgitorsClipboardManager>::ms_Singleton = 0;
+template<> OgitorsClipboardManager* Ogitors::Singleton<OgitorsClipboardManager>::ms_Singleton = 0;
 unsigned int OgitorsClipboardManager::mClipboardMaxSize = 10;
 
 //----------------------------------------------------------------------------------

File Ogitor/src/OgitorsUndoManager.cpp

View file
  • Ignore whitespace
 
 using namespace Ogitors;
 
-template<> OgitorsUndoManager* Singleton<OgitorsUndoManager>::ms_Singleton = 0;
+template<> OgitorsUndoManager* Ogitors::Singleton<OgitorsUndoManager>::ms_Singleton = 0;
 
 
 //----------------------------------------------------------------------------------

File OgreOfsPlugin/CMakeLists.txt

View file
  • Ignore whitespace
 	./src/Plugin.cpp
 )
 
-add_library(OgreOfsPlugin SHARED ${OgreOfsPlugin_hdrs} ${OgreOfsPlugin_srcs})
+ogitor_add_library(OgreOfsPlugin SHARED ${OgreOfsPlugin_hdrs} ${OgreOfsPlugin_srcs})
 set(LIBRARY_OUTPUT_PATH ../lib)
 
 

File Plugins/DotSceneSerializer/CMakeLists.txt

View file
  • Ignore whitespace
 link_directories(${DEPENDENCIES_LIBPATH})
 
 link_libraries(${OGRE_LIBRARIES} Ogitor Hydrax)
-add_library(DotSceneSerializer SHARED ${HEADER_FILES} ${SOURCE_FILES})
+ogitor_add_library(DotSceneSerializer SHARED ${HEADER_FILES} ${SOURCE_FILES})
 #target_link_libraries(OgreMain Ogitor)
 set(LIBRARY_OUTPUT_PATH ../lib)
 

File Plugins/OgHydrax/CMakeLists.txt

View file
  • Ignore whitespace
 link_directories(${DEPENDENCIES_LIBPATH})
 
 link_libraries(${OGRE_LIBRARIES} Ogitor Hydrax)
-add_library(OgHydrax SHARED ${HEADER_FILES} ${SOURCE_FILES})
+ogitor_add_library(OgHydrax SHARED ${HEADER_FILES} ${SOURCE_FILES})
 #target_link_libraries(OgreMain Ogitor)
 set(LIBRARY_OUTPUT_PATH ../lib)
 

File Plugins/OgMaterialEditor/CMakeLists.txt

View file
  • Ignore whitespace
 	link_directories(${DEPENDENCIES_LIBPATH})
 
 	link_libraries(${QT_QTMAIN_LIBRARY} ${QT_LIBRARIES} ${OGRE_LIBRARIES} Ogitor GenericTextEditor)
-	add_library(OgMaterialEditor SHARED ${SRCS})
+	ogitor_add_library(OgMaterialEditor SHARED ${SRCS})
 	set(LIBRARY_OUTPUT_PATH ../lib)
 
     if(NOT OGITOR_DIST)

File Plugins/OgModularZone/CMakeLists.txt

View file
  • Ignore whitespace
 	link_directories(${DEPENDENCIES_LIBPATH})
 
 	link_libraries(${QT_QTMAIN_LIBRARY} ${QT_LIBRARIES} ${OGRE_LIBRARIES} Ogitor)
-	add_library(OgModularZone SHARED ${SRCS})
+	ogitor_add_library(OgModularZone SHARED ${SRCS})
 	set(LIBRARY_OUTPUT_PATH ../lib)
 
     if(NOT OGITOR_DIST)

File SceneLoader/CMakeLists.txt

View file
  • Ignore whitespace
 	endif(WIN32)
 
 	if(NOT APPLE)
-		add_executable(SampleLoadApp WIN32 ${SRCS} ${SampleLoadApp_res})
+		ogitor_add_executable(SampleLoadApp WIN32 ${SRCS} ${SampleLoadApp_res})
 	else()
-		add_executable(SampleLoadApp MACOSX_BUNDLE 
+		ogitor_add_executable(SampleLoadApp MACOSX_BUNDLE 
 			${SRCS} 
 			${SampleLoadApp_res})
 	endif(NOT APPLE)

File qtOfs/CMakeLists.txt

View file
  • Ignore whitespace
 		file(GLOB qtOfs_res ./res/*.rc)
 	endif(WIN32)
 
-        add_executable(qtOfs WIN32 ${SRCS} ${RESOURCE_SRCS} ${qtOfs_res})
+        ogitor_add_executable(qtOfs WIN32 ${SRCS} ${RESOURCE_SRCS} ${qtOfs_res})
 
 	if(WIN32)
 		set_target_properties(qtOfs PROPERTIES DEBUG_POSTFIX _d)

File qtOgitor/CMakeLists.txt

View file
  • Ignore whitespace
     endif(WIN32)
 
     if(NOT APPLE)
-        add_executable(qtOgitor WIN32 ${SRCS} ${RESOURCE_SRCS} ${qtOgitor_res})
+        ogitor_add_executable(qtOgitor WIN32 ${SRCS} ${RESOURCE_SRCS} ${qtOgitor_res})
     else()
         # The first time we build Ogitor.framework will not exist so create a dummy file if necessary
         find_file(OGITOR_FRAMEWORK_FILE Ogitor.framework "${CMAKE_BINARY_DIR}/Ogitor/lib/Debug/" NO_SYSTEM_ENVIRONMENT_PATH)

File qtOgitor/qtpropertybrowser-2.5/CMakeLists.txt

View file
  • Ignore whitespace
     ${qtpropertyeditor_HDRS}
     )
 
-    ADD_LIBRARY(QtSolutions_PropertyBrowser SHARED ${SRCS})
+    add_library(QtSolutions_PropertyBrowser SHARED ${SRCS})
 
     TARGET_LINK_LIBRARIES(QtSolutions_PropertyBrowser ${QT_LIBRARIES})