blob: 5bfccab96e07b3a1d97c9a22f82d95c75e0dd9f1 [file] [log] [blame]
diff -Naur newton-dynamics-3.14c.orig/CMakeLists.txt newton-dynamics-3.14c/CMakeLists.txt
--- newton-dynamics-3.14c.orig/CMakeLists.txt 2020-11-30 21:36:02.254071600 +0100
+++ newton-dynamics-3.14c/CMakeLists.txt 2020-11-30 21:36:49.506556700 +0100
@@ -48,6 +48,17 @@
add_definitions(-DDG_USE_THREAD_EMULATION)
endif()
+if(NEWTON_BUILD_SHARED_LIBS)
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a")
+else()
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+endif()
+
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+find_library(TINYXML_LIB tinyxml REQUIRED)
+find_path(TINYXML_INCLUDE tinyxml.h REQUIRED)
+message(STATUS "Found tiny xml: ${TINYXML_LIB}, ${TINYXML_INCLUDE}")
+
#If no build type set, Release as default
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
diff -Naur newton-dynamics-3.14c.orig/sdk/dScene/CMakeLists.txt newton-dynamics-3.14c/sdk/dScene/CMakeLists.txt
--- newton-dynamics-3.14c.orig/sdk/dScene/CMakeLists.txt 2020-05-03 00:08:37.000000000 +0200
+++ newton-dynamics-3.14c/sdk/dScene/CMakeLists.txt 2020-11-30 21:39:12.833003400 +0100
@@ -34,8 +34,8 @@
add_library(${projectName} STATIC ${CPP_SOURCE})
endif(NEWTON_BUILD_SHARED_LIBS)
-target_include_directories(${projectName} PUBLIC . ../dAnimation)
-target_link_libraries (${projectName} newton dContainers dMath tinyxml)
+target_include_directories(${projectName} PUBLIC . ../dAnimation ${TINYXML_INCLUDE})
+target_link_libraries (${projectName} newton dContainers dMath ${TINYXML_LIB})
if (NEWTON_BUILD_PROFILER)
target_link_libraries (${projectName} dProfiler)
endif()
diff -Naur newton-dynamics-3.14c.orig/sdk/thirdParty/tinyxml/CMakeLists.txt newton-dynamics-3.14c/sdk/thirdParty/tinyxml/CMakeLists.txt
--- newton-dynamics-3.14c.orig/sdk/thirdParty/tinyxml/CMakeLists.txt 2020-05-03 00:08:37.000000000 +0200
+++ newton-dynamics-3.14c/sdk/thirdParty/tinyxml/CMakeLists.txt 2020-11-30 21:37:08.082762700 +0100
@@ -7,19 +7,3 @@
# Permission is granted to anyone to use this software for any purpose,
# including commercial applications, and to alter it and redistribute it
# freely.
-
-cmake_minimum_required(VERSION 3.4.0)
-
-set (projectName "tinyxml")
-message (${projectName})
-
-
-# low level core
-file(GLOB CPP_SOURCE *.cpp)
-file(GLOB HEADERS *.h)
-
-add_library(${projectName} STATIC ${CPP_SOURCE})
-target_include_directories(${projectName} PUBLIC .)
-if(UNIX)
- target_compile_options(${projectName} PRIVATE -fPIC)
-endif()
\ No newline at end of file