Skip to content

Commit

Permalink
Use target_include_directories to publicly expose include dir
Browse files Browse the repository at this point in the history
  • Loading branch information
scribam authored and p0358 committed Oct 14, 2024
1 parent c62c34d commit 05eeac6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include_directories(${PROJECT_SOURCE_DIR}/include)

option(ENABLE_IO_THREAD "Start up a separate I/O thread, otherwise I'd need to call an update function" ON)
option(USE_STATIC_CRT "Use /MT[d] for dynamic library" OFF)
option(WARNINGS_AS_ERRORS "When enabled, compiles with `-Werror` (on *nix platforms)." OFF)
Expand Down Expand Up @@ -114,6 +112,8 @@ endif(UNIX)

target_include_directories(discord-rpc PRIVATE ${RAPIDJSON}/include)

target_include_directories(discord-rpc PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>)

if (NOT ${ENABLE_IO_THREAD})
target_compile_definitions(discord-rpc PUBLIC -DDISCORD_DISABLE_IO_THREAD)
endif (NOT ${ENABLE_IO_THREAD})
Expand Down

0 comments on commit 05eeac6

Please sign in to comment.