fix: use project source dir instead of cmake source dir
Florian Walbroel

Florian Walbroel commited on 2020-08-27 09:46:56
Showing 2 changed files, with 6 additions and 6 deletions.

... ...
@@ -3,11 +3,11 @@ add_custom_command(
3 3
   ${CMAKE_CURRENT_BINARY_DIR}/src/uproctrace.pb-c.c
4 4
   ${CMAKE_CURRENT_BINARY_DIR}/src/uproctrace.pb-c.h
5 5
   DEPENDS
6
-  ${CMAKE_SOURCE_DIR}/uproctrace.proto
6
+  ${PROJECT_SOURCE_DIR}/uproctrace.proto
7 7
   COMMAND
8
-  protoc-c --proto_path ${CMAKE_SOURCE_DIR}
8
+  protoc-c --proto_path ${PROJECT_SOURCE_DIR}
9 9
            --c_out ${CMAKE_CURRENT_BINARY_DIR}/src
10
-           ${CMAKE_SOURCE_DIR}/uproctrace.proto
10
+           ${PROJECT_SOURCE_DIR}/uproctrace.proto
11 11
 )
12 12
 
13 13
 add_library(
... ...
@@ -11,11 +11,11 @@ add_custom_command(
11 11
   OUTPUT
12 12
   ${PYTHON_UPT_DIR}/uproctrace_pb2.py
13 13
   DEPENDS
14
-  ${CMAKE_SOURCE_DIR}/uproctrace.proto
14
+  ${PROJECT_SOURCE_DIR}/uproctrace.proto
15 15
   COMMAND
16
-  protoc --proto_path ${CMAKE_SOURCE_DIR}
16
+  protoc --proto_path ${PROJECT_SOURCE_DIR}
17 17
          --python_out ${PYTHON_UPT_DIR}
18
-         ${CMAKE_SOURCE_DIR}/uproctrace.proto
18
+         ${PROJECT_SOURCE_DIR}/uproctrace.proto
19 19
 )
20 20
 install(
21 21
   FILES
22 22