Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions examples/ThirdPartyLibs/Gwen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,16 @@ ADD_DEFINITIONS( -DGLEW_STATIC -DGWEN_COMPILE_STATIC -D_HAS_EXCEPTIONS=0 )
FILE(GLOB gwen_SRCS "*.cpp" "Controls/*.cpp" "Controls/Dialog/*.cpp" "Controls/Dialogs/*.cpp" "Controls/Layout/*.cpp" "Controls/Property/*.cpp" "Input/*.cpp" "Platforms/*.cpp" "Renderers/*.cpp" "Skins/*.cpp")
FILE(GLOB gwen_HDRS "*.h" "Controls/*.h" "Controls/Dialog/*.h" "Controls/Dialogs/*.h" "Controls/Layout/*.h" "Controls/Property/*.h" "Input/*.h" "Platforms/*.h" "Renderers/*.h" "Skins/*.h")

# Add PCH source file
SET(gwen_SRCS ${gwen_SRCS} GwenPCH.cpp)

ADD_LIBRARY(gwen ${gwen_SRCS} ${gwen_HDRS})

# Enable precompiled headers (CMake 3.16+)
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
TARGET_PRECOMPILE_HEADERS(gwen PRIVATE GwenPCH.h)
ENDIF()

IF (BUILD_SHARED_LIBS)
IF(WIN32 OR APPLE)
target_link_libraries(gwen ${OPENGL_gl_LIBRARY})
Expand Down
5 changes: 5 additions & 0 deletions examples/ThirdPartyLibs/Gwen/GwenPCH.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*
GWEN Library - Precompiled Header Implementation
*/

#include "GwenPCH.h"
29 changes: 29 additions & 0 deletions examples/ThirdPartyLibs/Gwen/GwenPCH.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
GWEN Library - Precompiled Header
*/

#ifndef GWEN_PCH_H
#define GWEN_PCH_H

// Standard Library Headers - Most expensive
#include <string>
#include <vector>
#include <map>
#include <list>
#include <set>
#include <algorithm>
#include <cmath>
#include <cassert>
#include <sstream>
#include <iostream>

// Windows headers (if on Windows) - without LEAN_AND_MEAN for Gwen
#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#include <commdlg.h>
#endif

#endif // GWEN_PCH_H
5 changes: 5 additions & 0 deletions src/Bullet3Collision/Bullet3CollisionPCH.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*
Bullet3 Collision - Precompiled Header Implementation
*/

#include "Bullet3CollisionPCH.h"
13 changes: 13 additions & 0 deletions src/Bullet3Collision/Bullet3CollisionPCH.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
Bullet3 Collision - Precompiled Header
*/

#ifndef BULLET3_COLLISION_PCH_H
#define BULLET3_COLLISION_PCH_H

// Standard Library Headers
#include <vector>
#include <cmath>
#include <cassert>

#endif // BULLET3_COLLISION_PCH_H
7 changes: 7 additions & 0 deletions src/Bullet3Collision/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ INCLUDE_DIRECTORIES(
)

SET(Bullet3Collision_SRCS
Bullet3CollisionPCH.cpp
BroadPhaseCollision/b3DynamicBvh.cpp
BroadPhaseCollision/b3DynamicBvhBroadphase.cpp
BroadPhaseCollision/b3OverlappingPairCache.cpp
Expand Down Expand Up @@ -58,6 +59,12 @@ SET(Bullet3Collision_HDRS
)

ADD_LIBRARY(Bullet3Collision ${Bullet3Collision_SRCS} ${Bullet3Collision_HDRS})

# Enable precompiled headers (CMake 3.16+)
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
TARGET_PRECOMPILE_HEADERS(Bullet3Collision PRIVATE Bullet3CollisionPCH.h)
ENDIF()

if (BUILD_SHARED_LIBS)
target_link_libraries(Bullet3Collision Bullet3Geometry)
endif ()
Expand Down
5 changes: 5 additions & 0 deletions src/Bullet3Dynamics/Bullet3DynamicsPCH.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*
Bullet3 Dynamics - Precompiled Header Implementation
*/

#include "Bullet3DynamicsPCH.h"
13 changes: 13 additions & 0 deletions src/Bullet3Dynamics/Bullet3DynamicsPCH.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
Bullet3 Dynamics - Precompiled Header
*/

#ifndef BULLET3_DYNAMICS_PCH_H
#define BULLET3_DYNAMICS_PCH_H

// Standard Library Headers
#include <vector>
#include <cmath>
#include <cassert>

#endif // BULLET3_DYNAMICS_PCH_H
7 changes: 7 additions & 0 deletions src/Bullet3Dynamics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ INCLUDE_DIRECTORIES(
)

SET(Bullet3Dynamics_SRCS
Bullet3DynamicsPCH.cpp
b3CpuRigidBodyPipeline.cpp
ConstraintSolver/b3FixedConstraint.cpp
ConstraintSolver/b3Generic6DofConstraint.cpp
Expand All @@ -30,6 +31,12 @@ SET(Bullet3Dynamics_HDRS
)

ADD_LIBRARY(Bullet3Dynamics ${Bullet3Dynamics_SRCS} ${Bullet3Dynamics_HDRS})

# Enable precompiled headers (CMake 3.16+)
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
TARGET_PRECOMPILE_HEADERS(Bullet3Dynamics PRIVATE Bullet3DynamicsPCH.h)
ENDIF()

if (BUILD_SHARED_LIBS)
target_link_libraries(Bullet3Dynamics Bullet3Collision)
endif ()
Expand Down
6 changes: 6 additions & 0 deletions src/BulletCollision/BulletCollisionPCH.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Precompiled Header for BulletCollision - Implementation
*/

#include "BulletCollisionPCH.h"
37 changes: 37 additions & 0 deletions src/BulletCollision/BulletCollisionPCH.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
Bullet Continuous Collision Detection and Physics Library
Precompiled Header for BulletCollision
*/

#ifndef BULLET_COLLISION_PCH_H
#define BULLET_COLLISION_PCH_H

// Standard Library Headers - Most expensive
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>
#include <cassert>

// Windows headers (if on Windows)
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#endif

// Common Bullet LinearMath headers
#include "LinearMath/btQuaternion.h"
#include "LinearMath/btTransform.h"
#include "LinearMath/btDefaultMotionState.h"
#include "LinearMath/btQuickprof.h"
#include "LinearMath/btIDebugDraw.h"
#include "LinearMath/btSerializer.h"
#include "LinearMath/btHashMap.h"

#endif // BULLET_COLLISION_PCH_H
7 changes: 7 additions & 0 deletions src/BulletCollision/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src )

SET(BulletCollision_SRCS
BulletCollisionPCH.cpp
BroadphaseCollision/btAxisSweep3.cpp
BroadphaseCollision/btBroadphaseProxy.cpp
BroadphaseCollision/btCollisionAlgorithm.cpp
Expand Down Expand Up @@ -256,6 +257,12 @@ SET(BulletCollision_HDRS
ADD_LIBRARY(BulletCollision ${BulletCollision_SRCS} ${BulletCollision_HDRS})
SET_TARGET_PROPERTIES(BulletCollision PROPERTIES VERSION ${BULLET_VERSION})
SET_TARGET_PROPERTIES(BulletCollision PROPERTIES SOVERSION ${BULLET_VERSION})

# Enable precompiled headers (CMake 3.16+)
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
TARGET_PRECOMPILE_HEADERS(BulletCollision PRIVATE BulletCollisionPCH.h)
ENDIF()

IF (BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES(BulletCollision LinearMath)
ENDIF (BUILD_SHARED_LIBS)
Expand Down
6 changes: 6 additions & 0 deletions src/BulletDynamics/BulletDynamicsPCH.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Precompiled Header for BulletDynamics - Implementation
*/

#include "BulletDynamicsPCH.h"
32 changes: 32 additions & 0 deletions src/BulletDynamics/BulletDynamicsPCH.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
Bullet Continuous Collision Detection and Physics Library
Precompiled Header for BulletDynamics
*/

#ifndef BULLET_DYNAMICS_PCH_H
#define BULLET_DYNAMICS_PCH_H

// Standard Library Headers - Most expensive
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>
#include <cassert>

// Windows headers (if on Windows)
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#endif

// Common Bullet headers
#include "btBulletCollisionCommon.h"
#include "LinearMath/btHashMap.h"

#endif // BULLET_DYNAMICS_PCH_H
7 changes: 7 additions & 0 deletions src/BulletDynamics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src )


SET(BulletDynamics_SRCS
BulletDynamicsPCH.cpp
Character/btKinematicCharacterController.cpp
ConstraintSolver/btConeTwistConstraint.cpp
ConstraintSolver/btContactConstraint.cpp
Expand Down Expand Up @@ -143,6 +144,12 @@ SET(BulletDynamics_HDRS
ADD_LIBRARY(BulletDynamics ${BulletDynamics_SRCS} ${BulletDynamics_HDRS})
SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES VERSION ${BULLET_VERSION})
SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES SOVERSION ${BULLET_VERSION})

# Enable precompiled headers (CMake 3.16+)
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
TARGET_PRECOMPILE_HEADERS(BulletDynamics PRIVATE BulletDynamicsPCH.h)
ENDIF()

IF (BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES(BulletDynamics BulletCollision LinearMath)
ENDIF (BUILD_SHARED_LIBS)
Expand Down
6 changes: 6 additions & 0 deletions src/BulletSoftBody/BulletSoftBodyPCH.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Precompiled Header for BulletSoftBody - Implementation
*/

#include "BulletSoftBodyPCH.h"
32 changes: 32 additions & 0 deletions src/BulletSoftBody/BulletSoftBodyPCH.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
Bullet Continuous Collision Detection and Physics Library
Precompiled Header for BulletSoftBody
*/

#ifndef BULLET_SOFT_BODY_PCH_H
#define BULLET_SOFT_BODY_PCH_H

// Standard Library Headers - Most expensive
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>
#include <cassert>

// Windows headers (if on Windows)
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#endif

// Common Bullet headers
#include "btBulletDynamicsCommon.h"
#include "LinearMath/btHashMap.h"

#endif // BULLET_SOFT_BODY_PCH_H
7 changes: 7 additions & 0 deletions src/BulletSoftBody/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ${BULLET_PHYSICS_SOURCE_DIR}/src
#SUBDIRS( Solvers )

SET(BulletSoftBody_SRCS
BulletSoftBodyPCH.cpp
btSoftBody.cpp
btSoftBodyConcaveCollisionAlgorithm.cpp
btSoftBodyHelpers.cpp
Expand Down Expand Up @@ -80,6 +81,12 @@ SET(BulletSoftBody_HDRS
ADD_LIBRARY(BulletSoftBody ${BulletSoftBody_SRCS} ${BulletSoftBody_HDRS})
SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES VERSION ${BULLET_VERSION})
SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES SOVERSION ${BULLET_VERSION})

# Enable precompiled headers (CMake 3.16+)
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
TARGET_PRECOMPILE_HEADERS(BulletSoftBody PRIVATE BulletSoftBodyPCH.h)
ENDIF()

IF (BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES(BulletSoftBody BulletDynamics)
ENDIF (BUILD_SHARED_LIBS)
Expand Down
6 changes: 6 additions & 0 deletions src/LinearMath/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ INCLUDE_DIRECTORIES(
)

SET(LinearMath_SRCS
LinearMathPCH.cpp
btAlignedAllocator.cpp
btConvexHull.cpp
btConvexHullComputer.cpp
Expand Down Expand Up @@ -58,6 +59,11 @@ ADD_LIBRARY(LinearMath ${LinearMath_SRCS} ${LinearMath_HDRS})
SET_TARGET_PROPERTIES(LinearMath PROPERTIES VERSION ${BULLET_VERSION})
SET_TARGET_PROPERTIES(LinearMath PROPERTIES SOVERSION ${BULLET_VERSION})

# Enable precompiled headers (CMake 3.16+)
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
TARGET_PRECOMPILE_HEADERS(LinearMath PRIVATE LinearMathPCH.h)
ENDIF()

IF (INSTALL_LIBS)
IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
#FILES_MATCHING requires CMake 2.6
Expand Down
6 changes: 6 additions & 0 deletions src/LinearMath/LinearMathPCH.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Precompiled Header for LinearMath - Implementation
*/

#include "LinearMathPCH.h"
27 changes: 27 additions & 0 deletions src/LinearMath/LinearMathPCH.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
Bullet Continuous Collision Detection and Physics Library
Precompiled Header for LinearMath
*/

#ifndef LINEAR_MATH_PCH_H
#define LINEAR_MATH_PCH_H

// Standard Library Headers - Most expensive
#include <string>
#include <vector>
#include <cmath>
#include <cassert>
#include <algorithm>

// Windows headers (if on Windows)
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#endif

#endif // LINEAR_MATH_PCH_H