From 3fa0d2cf1800fca046337287d47928af6e1908d6 Mon Sep 17 00:00:00 2001
From: Mathis Rosenhauer <rosenhauer@dkrz.de>
Date: Mon, 27 Feb 2023 12:17:26 +0100
Subject: [PATCH] Move generated include files

to /../include
---
 CMakeLists.txt     |  2 +-
 src/CMakeLists.txt | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d05dde0..40abf56 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,7 +36,7 @@ endif()
 # Communicate findings to code. Has to be compatible with autoconf's config.h.
 configure_file(
   "cmake/config.h.in"
-  "${CMAKE_CURRENT_BINARY_DIR}/config.h")
+  "${CMAKE_CURRENT_BINARY_DIR}/include/config.h")
 
 # Create libaec.h with current version information
 configure_file(
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 31a7336..59df411 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -7,7 +7,7 @@ add_library(aec OBJECT
 target_include_directories(aec
   PUBLIC
   "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>"
-  "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/..>"
+  "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../include>"
   "$<INSTALL_INTERFACE:include>")
 
 # Create both static and shared aec library.
@@ -15,7 +15,8 @@ add_library(aec_static STATIC "$<TARGET_OBJECTS:aec>")
 target_link_libraries(aec_static PUBLIC aec)
 set_target_properties(aec_static
   PROPERTIES
-  OUTPUT_NAME $<IF:$<BOOL:${MSVC}>,aec-static,aec>)
+  OUTPUT_NAME $<IF:$<BOOL:${MSVC}>,aec-static,aec>
+)
 
 add_library(aec_shared SHARED "$<TARGET_OBJECTS:aec>")
 target_link_libraries(aec_shared PUBLIC aec)
@@ -23,8 +24,7 @@ set_target_properties(aec_shared
   PROPERTIES
   VERSION 0.0.12
   SOVERSION 0
-  OUTPUT_NAME aec
-  PUBLIC_HEADER ${CMAKE_CURRENT_BINARY_DIR}/../include/libaec.h)
+  OUTPUT_NAME aec)
 
 # Wrapper for compatibility with szip
 add_library(sz OBJECT sz_compat.c)
@@ -43,8 +43,7 @@ set_target_properties(sz_shared
   PROPERTIES
   VERSION 2.0.1
   SOVERSION 2
-  OUTPUT_NAME $<IF:$<BOOL:${MSVC}>,szip,sz>
-  PUBLIC_HEADER ../include/szlib.h)
+  OUTPUT_NAME $<IF:$<BOOL:${MSVC}>,szip,sz>)
 
 # Simple client for testing and benchmarking.
 # Can also be used stand-alone
-- 
GitLab