Skip to content

Commit

Permalink
Using git version for proxy_server
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackarain committed Jun 3, 2024
1 parent 6b5a127 commit 5ee1390
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ if (ENABLE_GIT_VERSION)
gitGetVersion(${CMAKE_CURRENT_SOURCE_DIR} proxy)
set(VERSION_GIT ${proxy_WC_REVISION_HASH})
string(TIMESTAMP PVERSION "${VERSION_GIT} (%Y-%m-%d %H:%M:%S)")
add_definitions(-DVERSION_GIT=\"${PVERSION}\")
message(STATUS "Git Version: ${PVERSION}")
endif()

Expand Down
2 changes: 2 additions & 0 deletions proxy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ target_link_libraries(libproxy
#source_group("Header Files\\proxy" FILES ${libproxy_HEADERS})
#source_group("Source Files" FILES ${libproxy_SRCS})

target_compile_definitions(libproxy PUBLIC -DVERSION_GIT=\"${PVERSION}\")

set_target_properties(libproxy PROPERTIES OUTPUT_NAME proxy PREFIX "lib" CLEAN_DIRECT_OUTPUT 1)

if (MSVC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.29.30129 AND CMAKE_VERSION VERSION_GREATER 3.20.3)
Expand Down
2 changes: 2 additions & 0 deletions server/proxy_server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ target_link_libraries(proxy_server
${PROXY_LIBRARIES}
)

target_compile_definitions(proxy_server PUBLIC -DVERSION_GIT=\"${PVERSION}\")

set_property(TARGET proxy_server PROPERTY FOLDER "server/proxy_server")

if (MSVC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.29.30129 AND CMAKE_VERSION VERSION_GREATER 3.20.3)
Expand Down

0 comments on commit 5ee1390

Please sign in to comment.