[neon/backports-focal/assimp/Neon/unstable] debian/tests: Revert "Update autopkgtest for CMake build"

Jonathan Riddell null at kde.org
Thu Dec 16 13:23:59 GMT 2021


Git commit 923845e26e516f66b2413f16552463aab01c6fd1 by Jonathan Riddell.
Committed on 16/12/2021 at 13:23.
Pushed by jriddell into branch 'Neon/unstable'.

Revert "Update autopkgtest for CMake build"

This reverts commit 24bf99ee11db3b8c915dd94859fa4271f3ec10fb.

A  +28   -0    debian/tests/CMakeLists_assimpcmd.txt
D  +0    -40   debian/tests/CMakeLists_sample.txt
M  +11   -13   debian/tests/build-cmake

https://invent.kde.org/neon/backports-focal/assimp/commit/923845e26e516f66b2413f16552463aab01c6fd1

diff --git a/debian/tests/CMakeLists_assimpcmd.txt b/debian/tests/CMakeLists_assimpcmd.txt
new file mode 100644
index 0000000..54e09f9
--- /dev/null
+++ b/debian/tests/CMakeLists_assimpcmd.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required( VERSION 3.10 )
+project(assimp_cmd)
+
+FIND_PACKAGE(assimp)
+
+INCLUDE_DIRECTORIES(
+  .
+  ${ASSIMP_INCLUDE_DIR}
+)
+
+ADD_DEFINITIONS(-DASSIMP_BUILD_NO_OWN_ZLIB)
+
+ADD_EXECUTABLE( assimp_cmd
+  CompareDump.cpp
+  ImageExtractor.cpp
+  Main.cpp
+  Main.h
+  WriteDumb.cpp
+  Info.cpp
+  Export.cpp
+)
+
+SET_PROPERTY(TARGET assimp_cmd PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
+
+TARGET_LINK_LIBRARIES( assimp_cmd  ${ASSIMP_LIBRARIES} z )
+SET_TARGET_PROPERTIES( assimp_cmd PROPERTIES
+  OUTPUT_NAME assimp
+)
diff --git a/debian/tests/CMakeLists_sample.txt b/debian/tests/CMakeLists_sample.txt
deleted file mode 100644
index a3f78b4..0000000
--- a/debian/tests/CMakeLists_sample.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-SET(SAMPLE_PROJECT_NAME assimp_simpleogl)
-
-FIND_PACKAGE(assimp)
-FIND_PACKAGE(OpenGL)
-FIND_PACKAGE(GLUT)
-IF ( MSVC )
-  SET(M_LIB)
-ELSE ()
-  find_library(M_LIB m)
-ENDIF ()
-
-IF ( NOT GLUT_FOUND )
-  MESSAGE( WARNING "Please install glut." )
-ENDIF ()
-
-# Used for usage and error messages in the program.
-ADD_COMPILE_DEFINITIONS(ASSIMP_VERSION="<unknown>")
-ADD_COMPILE_DEFINITIONS(PROJECT_NAME="${SAMPLE_PROJECT_NAME}")
-
-if ( MSVC )
-  ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
-  ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
-endif ()
-
-INCLUDE_DIRECTORIES(
-  ${ASSIMP_INCLUDE_DIR}
-  ${OPENGL_INCLUDE_DIR}
-  ${GLUT_INCLUDE_DIR}
-)
-
-ADD_EXECUTABLE( ${SAMPLE_PROJECT_NAME}
-  Sample_SimpleOpenGL.c
-)
-
-SET_PROPERTY(TARGET ${SAMPLE_PROJECT_NAME} PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
-
-TARGET_LINK_LIBRARIES( ${SAMPLE_PROJECT_NAME} assimp ${ASSIMP_LIBRARIES} ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${M_LIB} )
-SET_TARGET_PROPERTIES( ${SAMPLE_PROJECT_NAME} PROPERTIES
-  OUTPUT_NAME ${SAMPLE_PROJECT_NAME}
-)
diff --git a/debian/tests/build-cmake b/debian/tests/build-cmake
index 139b16a..a2be78c 100755
--- a/debian/tests/build-cmake
+++ b/debian/tests/build-cmake
@@ -6,26 +6,24 @@ cd ${0%/*}/../..
 basedir=$(mktemp -d -p .)
 basedir=$(realpath "${basedir}")
 builddir=${basedir}/_build
-srcdir="${builddir}/../samplegl"
+srcdir="${builddir}/../assimp_cmd"
 
-#cp -rav tools/assimp_cmd "${basedir}"
-mkdir -p "${builddir}" "${srcdir}"
-#mkdir -p "${builddir}" "${srcdir}"/Common "${srcdir}"/PostProcessing
+cp -rav tools/assimp_cmd "${basedir}"
+mkdir -p "${builddir}" "${srcdir}"/Common "${srcdir}"/PostProcessing
 
-# copy the CMakeLists and sources to ensure a minimal setup
-cp samples/SimpleOpenGL/Sample_SimpleOpenGL.c "${srcdir}"
-cp debian/tests/CMakeLists_sample.txt "${srcdir}"/CMakeLists.txt
+# copy the CMakeLists and some required headers
+cp debian/tests/CMakeLists_assimpcmd.txt "${srcdir}"/CMakeLists.txt
+for f in Common/BaseProcess.h Common/assbin_chunks.h PostProcessing/ProcessHelper.h; do
+    cp code/${f} "${srcdir}/${f}"
+done
 
 # build!
 cd "${builddir}"
 cmake "${srcdir}" -DCMAKE_VERBOSE_MAKEFILE=ON
 make
 
-## quick test whether we succeeded
-cd -
-## (skipped as this actually requires X11/OpenGL and does not quit)
-# "${builddir}/"assimp_simpleogl test/models/OBJ/WusonOBJ.obj
-"${builddir}/"assimp_simpleogl --usage
+# quick test whether we succeeded
+./assimp version
 
 # cleanup
-rm -rvf "${basedir}"
+rm -rf "${basedir}"



More information about the Neon-commits mailing list