Skip to content

Commit 39d7c47

Browse files
ChrisThrashereXpl0it3r
authored andcommitted
Ensure public header path gets propagated to downstream targets
1 parent be27146 commit 39d7c47

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ project(CSFML VERSION 2.5.1)
1818
# include the configuration file
1919
include(${PROJECT_SOURCE_DIR}/cmake/Config.cmake)
2020

21-
# add the CSFML header path
22-
include_directories(${PROJECT_SOURCE_DIR}/include)
23-
2421
# add an option for choosing the build type (shared or static)
2522
csfml_set_option(BUILD_SHARED_LIBS TRUE BOOL "TRUE to build CSFML as shared libraries, FALSE to build it as static libraries")
2623

cmake/Macros.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ macro(csfml_add_library target)
1212
# create the target
1313
add_library(${target} ${THIS_SOURCES})
1414

15+
# add the CSFML header path
16+
target_include_directories(${target} PUBLIC ${PROJECT_SOURCE_DIR}/include)
17+
1518
# define the export symbol of the module
1619
string(REPLACE "-" "_" NAME_UPPER "${target}")
1720
string(TOUPPER "${NAME_UPPER}" NAME_UPPER)

0 commit comments

Comments
 (0)