Skip to content

Commit

Permalink
include: Moved kdb.h.in, updated CMakeLists
Browse files Browse the repository at this point in the history
kdb.h.in moved into subfolder elektra, so that kdb.h can be included by <elektra/kdb.h> and "elektra/kdb.h".
The configure_file and install commands in the CMakeLists.txt were moved/updated.
For custom target elektra_config_headers the path of kdb.h was updated.
Resolving ElektraInitiative#817
  • Loading branch information
bauhaus93 committed Jan 18, 2020
1 parent 3365fa9 commit 94de704
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/include/CMakeLists.txt
Expand Up @@ -157,8 +157,6 @@ endif (ENABLE_OPTIMIZATIONS)

test_big_endian (ELEKTRA_BIG_ENDIAN)

configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/kdb.h.in" "${CMAKE_CURRENT_BINARY_DIR}/kdb.h")

configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/kdbconfig.h.in" "${CMAKE_CURRENT_BINARY_DIR}/kdbconfig.h")

configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/kdbversion.h.in" "${CMAKE_CURRENT_BINARY_DIR}/kdbversion.h")
Expand All @@ -170,7 +168,6 @@ install (
kdbease.h
"${CMAKE_CURRENT_BINARY_DIR}/kdbtypes.h"
kdbhelper.h
"${CMAKE_CURRENT_BINARY_DIR}/kdb.h"
kdbmodule.h
kdbos.h
kdbopts.h
Expand All @@ -190,7 +187,7 @@ install (
kdbmerge.h
DESTINATION include/${TARGET_INCLUDE_FOLDER})

add_custom_target (elektra_config_headers ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/kdb.h ${CMAKE_CURRENT_BINARY_DIR}/kdbconfig.h
add_custom_target (elektra_config_headers ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/elektra/kdb.h ${CMAKE_CURRENT_BINARY_DIR}/kdbconfig.h
${CMAKE_CURRENT_BINARY_DIR}/kdbversion.h)

add_subdirectory (kdbio)
Expand Down
9 changes: 8 additions & 1 deletion src/include/elektra/CMakeLists.txt
@@ -1 +1,8 @@
install (FILES error.h conversion.h types.h DESTINATION include/${TARGET_INCLUDE_FOLDER}/elektra)
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/kdb.h.in" "${CMAKE_CURRENT_BINARY_DIR}/kdb.h")

install (FILES "${CMAKE_CURRENT_BINARY_DIR}/kdb.h" DESTINATION include/${TARGET_INCLUDE_FOLDER})

install (FILES error.h
conversion.h
types.h
DESTINATION include/${TARGET_INCLUDE_FOLDER}/elektra)
File renamed without changes.

0 comments on commit 94de704

Please sign in to comment.