diff --git a/CMakeLists.txt b/CMakeLists.txt
index d05dde01c84a7c183cd123cb693397c5e672a063..40abf5675de8ba88153f9c4c871de123b865a10f 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 31a73366c185b101149b87f0e1435ce85653ddfe..59df411829bc7c2bf32c4bdadf2926a4b81fa6d7 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