diff --git a/configure.ac b/configure.ac index 360516a..abfb59a 100644 --- a/configure.ac +++ b/configure.ac @@ -333,7 +333,6 @@ AC_MSG_RESULT([ AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile - tests/test_config.h config/Makefile config/gdlib-config config/gdlib.pc]) diff --git a/tests/.gitignore b/tests/.gitignore index 9422fc4..7e563b8 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,4 +1,2 @@ *.log *.trs - -/test_config.h diff --git a/tests/Makefile.am b/tests/Makefile.am index afdcd5d..21cfb0d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -4,6 +4,7 @@ libgdtest_a_SOURCES = \ gdtest/gdtest.c \ gdtest/gdtest.h \ gdhelpers.c +libgdtest_a_CPPFLAGS = $(AM_CPPFLAGS) -DGDTEST_TOP_DIR='"$(srcdir)"' # Setup vars that subdirs will increment. libgd_test_programs = @@ -63,7 +64,7 @@ include xbm/Makemodule.am include xpm/Makemodule.am LDADD = libgdtest.a ../src/libgd.la -AM_CPPFLAGS = -I$(top_srcdir)/src -I $(top_srcdir)/tests/gdtest +AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/tests/gdtest check_PROGRAMS = $(libgd_test_programs) $(libgd_helper_programs) TESTS += $(libgd_test_programs) diff --git a/tests/gdimagefile/gdnametest.c b/tests/gdimagefile/gdnametest.c index 40dbc30..eef561a 100644 --- a/tests/gdimagefile/gdnametest.c +++ b/tests/gdimagefile/gdnametest.c @@ -4,7 +4,6 @@ #include "gd.h" #include "gdtest.h" -#include "test_config.h" #define WIDTH 60 #define HEIGHT 50 diff --git a/tests/gdtest/CMakeLists.txt b/tests/gdtest/CMakeLists.txt index 5f89bc9..4b05262 100644 --- a/tests/gdtest/CMakeLists.txt +++ b/tests/gdtest/CMakeLists.txt @@ -1,4 +1,3 @@ -SET(GDTEST_TOP_DIR "${GD_SOURCE_DIR}/tests") -CONFIGURE_FILE(test_config.h.cmake test_config.h ESCAPE_QUOTES) +add_definitions(-DGDTEST_TOP_DIR="${CMAKE_CURRENT_SOURCE_DIR}/..") add_library (gdTest STATIC gdtest.c) target_link_libraries(gdTest ${GD_LIB}) diff --git a/tests/gdtest/Makemodule.am b/tests/gdtest/Makemodule.am index 5b4e39e..a68842e 100644 --- a/tests/gdtest/Makemodule.am +++ b/tests/gdtest/Makemodule.am @@ -1,5 +1,4 @@ # Note: Library is declared in tests/Makefile.am as it's used by all the tests. EXTRA_DIST += \ - gdtest/CMakeLists.txt \ - gdtest/test_config.h.cmake + gdtest/CMakeLists.txt diff --git a/tests/gdtest/gdtest.c b/tests/gdtest/gdtest.c index 93fb6e6..a75e101 100644 --- a/tests/gdtest/gdtest.c +++ b/tests/gdtest/gdtest.c @@ -27,7 +27,6 @@ #include "gd.h" #include "gdtest.h" -#include "test_config.h" /* max is already defined in windows/msvc */ #ifndef max diff --git a/tests/gdtest/gdtest.h b/tests/gdtest/gdtest.h index c831c10..e6cb2c5 100644 --- a/tests/gdtest/gdtest.h +++ b/tests/gdtest/gdtest.h @@ -2,7 +2,6 @@ #define GD_TEST_H #include -#include "test_config.h" typedef struct CuTestImageResult CuTestImageResult; struct CuTestImageResult { diff --git a/tests/gdtest/test_config.h.cmake b/tests/gdtest/test_config.h.cmake deleted file mode 100644 index 59d2f0c..0000000 --- a/tests/gdtest/test_config.h.cmake +++ /dev/null @@ -1,4 +0,0 @@ -/* Define the full path to the top src dir, required to get the path - * of each input data */ -#cmakedefine GDTEST_TOP_DIR "@GDTEST_TOP_DIR@" - diff --git a/tests/test_config.h.in b/tests/test_config.h.in deleted file mode 100644 index 78a6588..0000000 --- a/tests/test_config.h.in +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef GD_TEST_CONFIG_H -#define GD_TEST_CONFIG_H -/* Define the full path to the top src dir, required to get the path - * of each input data */ -#define GDTEST_TOP_DIR "@srcdir@" -#endif -