Browse Source

fix path errors

Sven Czarnian 3 years ago
parent
commit
ea460b1aaf
2 changed files with 4 additions and 4 deletions
  1. 3 3
      cmake/3rdPartyTargets.cmake
  2. 1 1
      cmake/Protobuf.cmake

+ 3 - 3
cmake/3rdPartyTargets.cmake

@@ -50,10 +50,10 @@ TARGET_INCLUDE_DIRECTORIES(GSL INTERFACE "${CMAKE_SOURCE_DIR}/external/include")
 ADD_LIBRARY(protobuf STATIC IMPORTED)
 IF (MSVC)
     SET_TARGET_PROPERTIES(protobuf PROPERTIES
-        IMPORTED_LOCATION_DEBUG "${CMAKE_INSTALL_PREFIX}/lib/libprotobufd.lib"
-        IMPORTED_LOCATION_RELEASE "${CMAKE_INSTALL_PREFIX}/lib/libprotobuf.lib"
+        IMPORTED_LOCATION_DEBUG "${CMAKE_SOURCE_DIR}/external/lib/libprotobufd.lib"
+        IMPORTED_LOCATION_RELEASE "${CMAKE_SOURCE_DIR}/external/lib/libprotobuf.lib"
     )
-    TARGET_INCLUDE_DIRECTORIES(protobuf INTERFACE "${CMAKE_INSTALL_PREFIX}/include")
+    TARGET_INCLUDE_DIRECTORIES(protobuf INTERFACE "${CMAKE_SOURCE_DIR}/external/include")
 ELSE ()
     MESSAGE(FATAL_ERROR "Unsupported compiler")
 ENDIF ()

+ 1 - 1
cmake/Protobuf.cmake

@@ -31,7 +31,7 @@ FUNCTION(ProtobufCompile PROTO_FILES SOURCE_FILES)
             DEPENDS protobuf
             COMMAND ${CMAKE_SOURCE_DIR}/external/bin/protoc.exe
             ARGS -I=${DIRECTORY} --cpp_out=${CMAKE_CURRENT_BINARY_DIR}/protobuf ${PROTO}
-            WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}/bin"
+            WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/external/bin"
             COMMENT "Creating C++-sources for ${PROTO}"
         )