Skip to content

Commit 16ef468

Browse files
committed
Use project version, not cmake version for library suffix
1 parent e36e188 commit 16ef468

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tensorflow_cc/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ if(TENSORFLOW_SHARED)
7979
)
8080
target_link_libraries(
8181
tensorflow_cc_shared INTERFACE
82-
"${CMAKE_INSTALL_PREFIX}/lib/libtensorflow_cc.so.${CMAKE_MAJOR_VERSION}"
82+
"${CMAKE_INSTALL_PREFIX}/lib/libtensorflow_cc.so.${PROJECT_VERSION_MAJOR}"
8383
dl pthread
8484
)
8585
if(SYSTEM_PROTOBUF)
@@ -226,18 +226,18 @@ endif()
226226
if(TENSORFLOW_SHARED)
227227
install(
228228
FILES "${CMAKE_CURRENT_BINARY_DIR}/tensorflow/bazel-bin/tensorflow/libtensorflow_cc.so"
229-
DESTINATION lib/libtensorflow_cc.so.${CMAKE_MAJOR_VERSION}
229+
DESTINATION lib/libtensorflow_cc.so.${PROJECT_VERSION_MAJOR}
230230
OPTIONAL
231231
)
232232
install(
233233
FILES "${CMAKE_CURRENT_BINARY_DIR}/tensorflow/bazel-bin/bin/tensorflow/libtensorflow_cc.so"
234-
DESTINATION lib/libtensorflow_cc.so.${CMAKE_MAJOR_VERSION}
234+
DESTINATION lib/libtensorflow_cc.so.${PROJECT_VERSION_MAJOR}
235235
OPTIONAL
236236
)
237237
# Make versioned symlinks to the library
238238
install(CODE "execute_process( \
239239
COMMAND ${CMAKE_COMMAND} -E create_symlink \
240-
libtensorflow_cc.so.${CMAKE_MAJOR_VERSION} \
240+
libtensorflow_cc.so.${PROJECT_VERSION_MAJOR} \
241241
${CMAKE_INSTALL_PREFIX}/lib/libtensorflow_cc.so \
242242
)"
243243
)

0 commit comments

Comments
 (0)