Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
89 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,153 +1,153 @@ | ||
if(NOT BOX2D_REALNUM_TYPE) | ||
set(BOX2D_REALNUM_TYPE float) | ||
if(NOT PLAYRHO_REALNUM_TYPE) | ||
set(PLAYRHO_REALNUM_TYPE float) | ||
endif() | ||
message("BOX2D_REALNUM_TYPE=${BOX2D_REALNUM_TYPE}") | ||
message("PLAYRHO_REALNUM_TYPE=${PLAYRHO_REALNUM_TYPE}") | ||
|
||
file(REMOVE "Common/RealNum.hpp") | ||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Common/RealNum.hpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/Common/RealNum.hpp") | ||
|
||
file(GLOB BOX2D_Collision_SRCS | ||
file(GLOB PLAYRHO_Collision_SRCS | ||
"Collision/*.cpp" | ||
) | ||
file(GLOB BOX2D_Collision_HDRS | ||
file(GLOB PLAYRHO_Collision_HDRS | ||
"Collision/*.hpp" | ||
) | ||
file(GLOB BOX2D_Shapes_SRCS | ||
file(GLOB PLAYRHO_Shapes_SRCS | ||
"Collision/Shapes/*.cpp" | ||
) | ||
file(GLOB BOX2D_Shapes_HDRS | ||
file(GLOB PLAYRHO_Shapes_HDRS | ||
"Collision/Shapes/*.hpp" | ||
) | ||
file(GLOB BOX2D_Common_SRCS | ||
file(GLOB PLAYRHO_Common_SRCS | ||
"Common/*.cpp" | ||
) | ||
file(GLOB BOX2D_Common_HDRS | ||
file(GLOB PLAYRHO_Common_HDRS | ||
"Common/*.hpp" | ||
) | ||
file(GLOB BOX2D_Dynamics_SRCS | ||
file(GLOB PLAYRHO_Dynamics_SRCS | ||
"Dynamics/*.cpp" | ||
) | ||
file(GLOB BOX2D_Dynamics_HDRS | ||
file(GLOB PLAYRHO_Dynamics_HDRS | ||
"Dynamics/*.hpp" | ||
) | ||
file(GLOB BOX2D_Contacts_SRCS | ||
file(GLOB PLAYRHO_Contacts_SRCS | ||
"Dynamics/Contacts/*.cpp" | ||
) | ||
file(GLOB BOX2D_Contacts_HDRS | ||
file(GLOB PLAYRHO_Contacts_HDRS | ||
"Dynamics/Contacts/*.hpp" | ||
) | ||
file(GLOB BOX2D_Joints_SRCS | ||
file(GLOB PLAYRHO_Joints_SRCS | ||
"Dynamics/Joints/*.cpp" | ||
) | ||
file(GLOB BOX2D_Joints_HDRS | ||
file(GLOB PLAYRHO_Joints_HDRS | ||
"Dynamics/Joints/*.hpp" | ||
) | ||
file(GLOB BOX2D_Rope_SRCS | ||
file(GLOB PLAYRHO_Rope_SRCS | ||
"Rope/*.cpp" | ||
) | ||
file(GLOB BOX2D_Rope_HDRS | ||
file(GLOB PLAYRHO_Rope_HDRS | ||
"Rope/*.hpp" | ||
) | ||
file(GLOB BOX2D_General_HDRS | ||
file(GLOB PLAYRHO_General_HDRS | ||
"*.hpp" | ||
) | ||
include_directories( ../ ) | ||
|
||
if (${BOX2D_ENABLE_COVERAGE} AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") | ||
if (${PLAYRHO_ENABLE_COVERAGE} AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") | ||
message("lib: Adding definitions for coverage analysis.") | ||
add_definitions(-fprofile-arcs -ftest-coverage) | ||
endif() | ||
|
||
if(BOX2D_BUILD_SHARED) | ||
add_library(Box2D_shared SHARED | ||
${BOX2D_General_HDRS} | ||
${BOX2D_Joints_SRCS} | ||
${BOX2D_Joints_HDRS} | ||
${BOX2D_Contacts_SRCS} | ||
${BOX2D_Contacts_HDRS} | ||
${BOX2D_Dynamics_SRCS} | ||
${BOX2D_Dynamics_HDRS} | ||
${BOX2D_Common_SRCS} | ||
${BOX2D_Common_HDRS} | ||
${BOX2D_Shapes_SRCS} | ||
${BOX2D_Shapes_HDRS} | ||
${BOX2D_Collision_SRCS} | ||
${BOX2D_Collision_HDRS} | ||
${BOX2D_Rope_SRCS} | ||
${BOX2D_Rope_HDRS} | ||
if(PLAYRHO_BUILD_SHARED) | ||
add_library(PlayRho_shared SHARED | ||
${PLAYRHO_General_HDRS} | ||
${PLAYRHO_Joints_SRCS} | ||
${PLAYRHO_Joints_HDRS} | ||
${PLAYRHO_Contacts_SRCS} | ||
${PLAYRHO_Contacts_HDRS} | ||
${PLAYRHO_Dynamics_SRCS} | ||
${PLAYRHO_Dynamics_HDRS} | ||
${PLAYRHO_Common_SRCS} | ||
${PLAYRHO_Common_HDRS} | ||
${PLAYRHO_Shapes_SRCS} | ||
${PLAYRHO_Shapes_HDRS} | ||
${PLAYRHO_Collision_SRCS} | ||
${PLAYRHO_Collision_HDRS} | ||
${PLAYRHO_Rope_SRCS} | ||
${PLAYRHO_Rope_HDRS} | ||
) | ||
set_target_properties(Box2D_shared PROPERTIES | ||
OUTPUT_NAME "Box2D" | ||
set_target_properties(PlayRho_shared PROPERTIES | ||
OUTPUT_NAME "PlayRho" | ||
CLEAN_DIRECT_OUTPUT 1 | ||
VERSION ${BOX2D_VERSION} | ||
VERSION ${PLAYRHO_VERSION} | ||
) | ||
endif() | ||
|
||
if(BOX2D_BUILD_STATIC) | ||
add_library(Box2D STATIC | ||
${BOX2D_General_HDRS} | ||
${BOX2D_Joints_SRCS} | ||
${BOX2D_Joints_HDRS} | ||
${BOX2D_Contacts_SRCS} | ||
${BOX2D_Contacts_HDRS} | ||
${BOX2D_Dynamics_SRCS} | ||
${BOX2D_Dynamics_HDRS} | ||
${BOX2D_Common_SRCS} | ||
${BOX2D_Common_HDRS} | ||
${BOX2D_Shapes_SRCS} | ||
${BOX2D_Shapes_HDRS} | ||
${BOX2D_Collision_SRCS} | ||
${BOX2D_Collision_HDRS} | ||
${BOX2D_Rope_SRCS} | ||
${BOX2D_Rope_HDRS} | ||
if(PLAYRHO_BUILD_STATIC) | ||
add_library(PlayRho STATIC | ||
${PLAYRHO_General_HDRS} | ||
${PLAYRHO_Joints_SRCS} | ||
${PLAYRHO_Joints_HDRS} | ||
${PLAYRHO_Contacts_SRCS} | ||
${PLAYRHO_Contacts_HDRS} | ||
${PLAYRHO_Dynamics_SRCS} | ||
${PLAYRHO_Dynamics_HDRS} | ||
${PLAYRHO_Common_SRCS} | ||
${PLAYRHO_Common_HDRS} | ||
${PLAYRHO_Shapes_SRCS} | ||
${PLAYRHO_Shapes_HDRS} | ||
${PLAYRHO_Collision_SRCS} | ||
${PLAYRHO_Collision_HDRS} | ||
${PLAYRHO_Rope_SRCS} | ||
${PLAYRHO_Rope_HDRS} | ||
) | ||
set_target_properties(Box2D PROPERTIES | ||
set_target_properties(PlayRho PROPERTIES | ||
CLEAN_DIRECT_OUTPUT 1 | ||
VERSION ${BOX2D_VERSION} | ||
VERSION ${PLAYRHO_VERSION} | ||
) | ||
endif() | ||
|
||
# These are used to create visual studio folders. | ||
source_group(Collision FILES ${BOX2D_Collision_SRCS} ${BOX2D_Collision_HDRS}) | ||
source_group(Collision\\Shapes FILES ${BOX2D_Shapes_SRCS} ${BOX2D_Shapes_HDRS}) | ||
source_group(Common FILES ${BOX2D_Common_SRCS} ${BOX2D_Common_HDRS}) | ||
source_group(Dynamics FILES ${BOX2D_Dynamics_SRCS} ${BOX2D_Dynamics_HDRS}) | ||
source_group(Dynamics\\Contacts FILES ${BOX2D_Contacts_SRCS} ${BOX2D_Contacts_HDRS}) | ||
source_group(Dynamics\\Joints FILES ${BOX2D_Joints_SRCS} ${BOX2D_Joints_HDRS}) | ||
source_group(Include FILES ${BOX2D_General_HDRS}) | ||
source_group(Rope FILES ${BOX2D_Rope_SRCS} ${BOX2D_Rope_HDRS}) | ||
source_group(Collision FILES ${PLAYRHO_Collision_SRCS} ${PLAYRHO_Collision_HDRS}) | ||
source_group(Collision\\Shapes FILES ${PLAYRHO_Shapes_SRCS} ${PLAYRHO_Shapes_HDRS}) | ||
source_group(Common FILES ${PLAYRHO_Common_SRCS} ${PLAYRHO_Common_HDRS}) | ||
source_group(Dynamics FILES ${PLAYRHO_Dynamics_SRCS} ${PLAYRHO_Dynamics_HDRS}) | ||
source_group(Dynamics\\Contacts FILES ${PLAYRHO_Contacts_SRCS} ${PLAYRHO_Contacts_HDRS}) | ||
source_group(Dynamics\\Joints FILES ${PLAYRHO_Joints_SRCS} ${PLAYRHO_Joints_HDRS}) | ||
source_group(Include FILES ${PLAYRHO_General_HDRS}) | ||
source_group(Rope FILES ${PLAYRHO_Rope_SRCS} ${PLAYRHO_Rope_HDRS}) | ||
|
||
if(BOX2D_INSTALL) | ||
if(PLAYRHO_INSTALL) | ||
# install headers | ||
install(FILES ${BOX2D_General_HDRS} DESTINATION include/Box2D) | ||
install(FILES ${BOX2D_Collision_HDRS} DESTINATION include/Box2D/Collision) | ||
install(FILES ${BOX2D_Shapes_HDRS} DESTINATION include/Box2D/Collision/Shapes) | ||
install(FILES ${BOX2D_Common_HDRS} DESTINATION include/Box2D/Common) | ||
install(FILES ${BOX2D_Dynamics_HDRS} DESTINATION include/Box2D/Dynamics) | ||
install(FILES ${BOX2D_Contacts_HDRS} DESTINATION include/Box2D/Dynamics/Contacts) | ||
install(FILES ${BOX2D_Joints_HDRS} DESTINATION include/Box2D/Dynamics/Joints) | ||
install(FILES ${BOX2D_Rope_HDRS} DESTINATION include/Box2D/Rope) | ||
install(FILES ${PLAYRHO_General_HDRS} DESTINATION include/PlayRho) | ||
install(FILES ${PLAYRHO_Collision_HDRS} DESTINATION include/PlayRho/Collision) | ||
install(FILES ${PLAYRHO_Shapes_HDRS} DESTINATION include/PlayRho/Collision/Shapes) | ||
install(FILES ${PLAYRHO_Common_HDRS} DESTINATION include/PlayRho/Common) | ||
install(FILES ${PLAYRHO_Dynamics_HDRS} DESTINATION include/PlayRho/Dynamics) | ||
install(FILES ${PLAYRHO_Contacts_HDRS} DESTINATION include/PlayRho/Dynamics/Contacts) | ||
install(FILES ${PLAYRHO_Joints_HDRS} DESTINATION include/PlayRho/Dynamics/Joints) | ||
install(FILES ${PLAYRHO_Rope_HDRS} DESTINATION include/PlayRho/Rope) | ||
|
||
# install libraries | ||
if(BOX2D_BUILD_SHARED) | ||
install(TARGETS Box2D_shared EXPORT Box2D-targets | ||
if(PLAYRHO_BUILD_SHARED) | ||
install(TARGETS PlayRho_shared EXPORT PlayRho-targets | ||
LIBRARY DESTINATION ${LIB_INSTALL_DIR} | ||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR} | ||
RUNTIME DESTINATION bin) | ||
endif() | ||
if(BOX2D_BUILD_STATIC) | ||
install(TARGETS Box2D EXPORT Box2D-targets DESTINATION ${LIB_INSTALL_DIR}) | ||
if(PLAYRHO_BUILD_STATIC) | ||
install(TARGETS PlayRho EXPORT PlayRho-targets DESTINATION ${LIB_INSTALL_DIR}) | ||
endif() | ||
|
||
# install build system hooks for third-party apps | ||
install(EXPORT Box2D-targets DESTINATION ${LIB_INSTALL_DIR}/Box2D) | ||
install(EXPORT PlayRho-targets DESTINATION ${LIB_INSTALL_DIR}/PlayRho) | ||
|
||
set (BOX2D_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include) | ||
set (BOX2D_INCLUDE_DIRS ${BOX2D_INCLUDE_DIR} ) | ||
set (BOX2D_LIBRARY_DIRS ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}) | ||
set (BOX2D_LIBRARY Box2D) | ||
set (BOX2D_LIBRARIES ${BOX2D_LIBRARY}) | ||
set (BOX2D_USE_FILE ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/cmake/Box2D/UseBox2D.cmake) | ||
configure_file(Box2DConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/Box2DConfig.cmake @ONLY ESCAPE_QUOTES) | ||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Box2DConfig.cmake UseBox2D.cmake DESTINATION ${LIB_INSTALL_DIR}/cmake/Box2D) | ||
endif(BOX2D_INSTALL) | ||
set (PLAYRHO_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include) | ||
set (PLAYRHO_INCLUDE_DIRS ${PLAYRHO_INCLUDE_DIR} ) | ||
set (PLAYRHO_LIBRARY_DIRS ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}) | ||
set (PLAYRHO_LIBRARY PlayRho) | ||
set (PLAYRHO_LIBRARIES ${PLAYRHO_LIBRARY}) | ||
set (PLAYRHO_USE_FILE ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/cmake/PlayRho/UsePlayRho.cmake) | ||
configure_file(PlayRhoConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/PlayRhoConfig.cmake @ONLY ESCAPE_QUOTES) | ||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PlayRhoConfig.cmake UsePlayRho.cmake DESTINATION ${LIB_INSTALL_DIR}/cmake/PlayRho) | ||
endif(PLAYRHO_INSTALL) |
File renamed without changes.
File renamed without changes.