|
@@ -4,11 +4,11 @@ project(spine-cpp)
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/../flags.cmake)
|
|
|
|
|
|
include_directories(include)
|
|
|
-file(GLOB INCLUDES "spine-cpp/include/**/*.h")
|
|
|
-file(GLOB SOURCES "spine-cpp/src/**/*.cpp")
|
|
|
+file(GLOB INCLUDES "include/**/*.h")
|
|
|
+file(GLOB SOURCES "src/**/*.cpp")
|
|
|
|
|
|
add_library(spine-cpp STATIC ${SOURCES} ${INCLUDES})
|
|
|
-target_include_directories(spine-cpp PUBLIC spine-cpp/include)
|
|
|
+target_include_directories(spine-cpp PUBLIC include)
|
|
|
|
|
|
# Install target
|
|
|
install(TARGETS spine-cpp EXPORT spine-cpp_TARGETS DESTINATION dist/lib)
|
|
@@ -18,4 +18,9 @@ install(FILES ${INCLUDES} DESTINATION dist/include)
|
|
|
export(
|
|
|
EXPORT spine-cpp_TARGETS
|
|
|
FILE ${CMAKE_CURRENT_BINARY_DIR}/spine-cppTargets.cmake
|
|
|
- NAMESPACE "Spine::")
|
|
|
+ NAMESPACE "Spine::")
|
|
|
+
|
|
|
+# Optional tests
|
|
|
+if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
|
|
+ add_subdirectory(tests)
|
|
|
+endif()
|