|
@@ -5,8 +5,9 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
|
|
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR} CACHE PATH "Install location" FORCE)
|
|
|
endif()
|
|
|
set(CMAKE_VERBOSE_MAKEFILE ON)
|
|
|
-set(SPINE_SFML FALSE CACHE BOOL FALSE)
|
|
|
-set(SPINE_SANITIZE FALSE CACHE BOOL FALSE)
|
|
|
+option(SPINE_SFML "Build spine SFML API" OFF)
|
|
|
+option(SPINE_SANITIZE "Build with sanitization" OFF)
|
|
|
+option(BUILD_TESTING "Build with testing" ON)
|
|
|
|
|
|
if(MSVC)
|
|
|
message("MSCV detected")
|
|
@@ -42,5 +43,12 @@ elseif((${SPINE_SDL}) OR (${CMAKE_CURRENT_BINARY_DIR} MATCHES "spine-sdl"))
|
|
|
else()
|
|
|
add_subdirectory(spine-c)
|
|
|
add_subdirectory(spine-cpp)
|
|
|
- add_subdirectory(spine-cpp/spine-cpp-unit-tests)
|
|
|
-endif()
|
|
|
+ if (${BUILD_TESTING})
|
|
|
+ add_subdirectory(spine-cpp/spine-cpp-unit-tests)
|
|
|
+ endif()
|
|
|
+endif()
|
|
|
+
|
|
|
+# Create config file that include the exported targets
|
|
|
+configure_file(SpineConfig.cmake.in
|
|
|
+ "${CMAKE_CURRENT_BINARY_DIR}/SpineConfig.cmake"
|
|
|
+ @ONLY)
|