Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit d113ba8

Browse files
meastpg-easy
authored andcommitted
Replace OPENCENSUS_INCLUDE_DIR with CMAKE_SOURCE_DIR. (#261)
The OPENCENSUS_INCLUDE_DIR alias isn't needed.
1 parent 2e1e2ed commit d113ba8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ project(opencensus-cpp VERSION 0.3.0 LANGUAGES CXX)
2525

2626
set(CMAKE_CXX_STANDARD 11)
2727
set(CMAKE_CXX_STANDARD_REQUIRED ON)
28-
set(OPENCENSUS_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
2928

3029
include(CTest) # Defines option BUILD_TESTING.
3130
enable_testing()
3231

3332
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
3433
include(OpenCensusDeps)
34+
3535
include(OpenCensusHelpers)
3636

3737
# OpenCensus code.

cmake/OpenCensusHelpers.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ function(opencensus_lib NAME)
4747
if(ARG_SRCS)
4848
add_library(${_NAME} ${ARG_SRCS})
4949
target_link_libraries(${_NAME} PUBLIC ${ARG_DEPS})
50-
target_include_directories(${_NAME} PUBLIC ${OPENCENSUS_INCLUDE_DIR})
50+
target_include_directories(${_NAME} PUBLIC ${CMAKE_SOURCE_DIR})
5151
else()
5252
add_library(${_NAME} INTERFACE)
5353
target_link_libraries(${_NAME} INTERFACE ${ARG_DEPS})
54-
target_include_directories(${_NAME} INTERFACE ${OPENCENSUS_INCLUDE_DIR})
54+
target_include_directories(${_NAME} INTERFACE ${CMAKE_SOURCE_DIR})
5555
endif()
5656
if(ARG_PUBLIC)
5757
add_library(${PROJECT_NAME}::${NAME} ALIAS ${_NAME})

0 commit comments

Comments
 (0)