|
@@ -243,7 +243,9 @@ if (XCODE)
|
|
|
endif()
|
|
|
|
|
|
# Install Jolt library and includes
|
|
|
-install(TARGETS Jolt DESTINATION lib)
|
|
|
+install(TARGETS Jolt
|
|
|
+ EXPORT JoltExport
|
|
|
+ DESTINATION lib)
|
|
|
foreach(SRC_FILE ${JOLT_PHYSICS_SRC_FILES})
|
|
|
string(REPLACE ${PHYSICS_REPO_ROOT} "" RELATIVE_SRC_FILE ${SRC_FILE})
|
|
|
get_filename_component(DESTINATION_PATH ${RELATIVE_SRC_FILE} DIRECTORY)
|
|
@@ -252,6 +254,15 @@ foreach(SRC_FILE ${JOLT_PHYSICS_SRC_FILES})
|
|
|
endif()
|
|
|
endforeach()
|
|
|
|
|
|
+# Export Jolt library
|
|
|
+export(TARGETS Jolt
|
|
|
+ NAMESPACE Jolt::
|
|
|
+ FILE JoltConfig.cmake)
|
|
|
+install(EXPORT JoltExport
|
|
|
+ DESTINATION lib/cmake/Jolt/
|
|
|
+ NAMESPACE Jolt::
|
|
|
+ FILE JoltConfig.cmake)
|
|
|
+
|
|
|
# Check if we're the root CMakeLists.txt, if not we are included by another CMake file and we should disable everything except for the main library
|
|
|
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
|
|
|
# Ability to turn ON/OFF individual applications
|