Skip to content
Permalink
Browse files

cmake: Use target_compile_definitions() for WPE_COMPILATION

This defines the symbol only for the compilation of the library target,
instead of applying it globally.
  • Loading branch information...
aperezdc committed Aug 14, 2019
1 parent 9ee5db4 commit c1975f44c18fb0eb9fd0e8d89bb16090528e7d96
Showing with 1 addition and 2 deletions.
  1. +1 −2 CMakeLists.txt
@@ -51,8 +51,6 @@ include(GNUInstallDirs)
find_package(EGL REQUIRED)
find_package(Libxkbcommon REQUIRED)

add_definitions(-DWPE_COMPILATION)

set(WPE_INCLUDE_DIRECTORIES
"include"
"src"
@@ -99,6 +97,7 @@ target_include_directories(wpe PRIVATE
$<TARGET_PROPERTY:GL::egl,INTERFACE_INCLUDE_DIRECTORIES>
)
target_compile_definitions(wpe PRIVATE
WPE_COMPILATION
$<TARGET_PROPERTY:GL::egl,INTERFACE_COMPILE_DEFINITIONS>
)
if (WPE_BACKEND)

0 comments on commit c1975f4

Please sign in to comment.
You can’t perform that action at this time.