Set HAVE_GENERIC_PROJ directly in CMake config

Instead of going through config.h. It is simpler and including config.h
can't be forgotten.
HEAD
Jochen Topf 2022-02-02 15:04:08 +01:00
parent 8db3f5e835
commit 8f2cd5d1de
5 changed files with 2 additions and 6 deletions

View File

@ -220,7 +220,7 @@ else()
message(STATUS "Found proj_api.h")
find_library(PROJ_LIBRARY NAMES proj)
message(STATUS "Found Proj [API 4] ${PROJ_LIBRARY}")
set(HAVE_GENERIC_PROJ 1)
add_definitions(-DHAVE_GENERIC_PROJ=4)
set(HAVE_PROJ4 1)
list(APPEND LIBS ${PROJ_LIBRARY})
include_directories(SYSTEM ${PROJ4_INCLUDE_DIR})
@ -229,7 +229,7 @@ else()
find_library(PROJ_LIBRARY NAMES proj)
if (PROJ_LIBRARY)
message(STATUS "Found Proj [API 6] ${PROJ_LIBRARY}")
set(HAVE_GENERIC_PROJ 1)
add_definitions(-DHAVE_GENERIC_PROJ=6)
set(HAVE_PROJ6 1)
list(APPEND LIBS ${PROJ_LIBRARY})
include_directories(SYSTEM ${PROJ6_INCLUDE_DIR})

View File

@ -1,4 +1,3 @@
#cmakedefine HAVE_LUA 1
#cmakedefine HAVE_LUAJIT 1
#cmakedefine HAVE_TERMIOS_H 1
#cmakedefine HAVE_GENERIC_PROJ 1

View File

@ -12,7 +12,6 @@
#include <vector>
#include "common-import.hpp"
#include "config.h"
#include "reprojection.hpp"
static testing::db::import_t db;

View File

@ -12,7 +12,6 @@
#include "common-import.hpp"
#include "common-options.hpp"
#include "config.h"
#include "format.hpp"
#include <array>

View File

@ -9,7 +9,6 @@
#include <catch.hpp>
#include "config.h"
#include "reprojection.hpp"
TEST_CASE("projection 4326", "[NoDB]")