Skip to content

Commit

Permalink
move preprocessor macros directly in a standard header file
Browse files Browse the repository at this point in the history
  • Loading branch information
phyBrackets committed Jun 5, 2024
1 parent c0c23c8 commit 0f56c10
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
10 changes: 0 additions & 10 deletions cmake/KDBindingsConfig.h.in

This file was deleted.

13 changes: 6 additions & 7 deletions src/kdbindings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@
# Contact KDAB at <info@kdab.com> for commercial licensing options.
#

option(KDBINDINGS_ENABLE_WARN_UNUSED "Enable warnings for unused ConnectionHandles" OFF)

configure_file(
"${PROJECT_SOURCE_DIR}/cmake/KDBindingsConfig.h.in"
"${CMAKE_BINARY_DIR}/include/KDBindingsConfig.h"
)
option(KDBINDINGS_ENABLE_WARN_UNUSED "Enable warnings for unused ConnectionHandles" ON)

set(HEADERS
binding.h
Expand Down Expand Up @@ -40,10 +35,14 @@ add_library(KDAB::KDBindings ALIAS KDBindings)
set_target_properties(KDBindings PROPERTIES
INTERFACE_COMPILE_FEATURES cxx_std_17
)

if(KDBINDINGS_ENABLE_WARN_UNUSED)
target_compile_definitions(KDBindings INTERFACE KDBINDINGS_ENABLE_WARN_UNUSED=1)
endif()

target_include_directories(KDBindings INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include> # Include the build directory for the configured header
)
if(KDBindings_ERROR_ON_WARNING)
if(MSVC)
Expand Down
4 changes: 2 additions & 2 deletions src/kdbindings/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

#pragma once

#include "KDBindingsConfig.h"

#include <assert.h>
#include <memory>
#include <stdexcept>
Expand All @@ -21,8 +23,6 @@
#include <kdbindings/genindex_array.h>
#include <kdbindings/utils.h>

#include <KDBindingsConfig.h>

/**
* @brief The main namespace of the KDBindings library.
*
Expand Down

0 comments on commit 0f56c10

Please sign in to comment.