Skip to content

Commit b3132aa

Browse files
committed
CR changes
1 parent ce3a9f4 commit b3132aa

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ add_custom_target(
9494

9595
###########################################################################
9696
# Add target to replace the unity package version number in files
97+
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
98+
set(VERSION_AS_STRING "\\'${PACKAGE_VERSION}\\'")
99+
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
100+
set(VERSION_AS_STRING "'${PACKAGE_VERSION}'")
101+
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
102+
set(VERSION_AS_STRING "\\'${PACKAGE_VERSION}\\'")
103+
endif()
104+
97105
set(README_TARGET readme_replace)
98106
add_custom_target(
99107
${README_TARGET}
@@ -106,7 +114,7 @@ add_custom_target(
106114
"${CMAKE_SOURCE_DIR}/scripts/file-search-replace.py"
107115
"${CMAKE_SOURCE_DIR}/Assets/FbxExporters/Integrations/Autodesk/maya/scripts/UnityFbxForMaya/version.py"
108116
".*VERSION.*=.*"
109-
"VERSION = \\'${PACKAGE_VERSION}\\'"
117+
"VERSION = ${VERSION_AS_STRING}"
110118
DEPENDS "${CMAKE_SOURCE_DIR}/scripts/file-search-replace.py"
111119
COMMENT "Replacing version number in files with ${PACKAGE_VERSION}"
112120
)

0 commit comments

Comments
 (0)