Skip to content

Commit 2bb5fb8

Browse files
committed
compile FbxPrefab and FbxPrefabAutoUpdater
1 parent bfa27ea commit 2bb5fb8

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

CMakeLists.txt

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,23 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
120120
COMMAND ${CMAKE_COMMAND} -E make_directory ${CLASS_LIBRARY_DEST}
121121
)
122122

123+
set(RUNTIME_CLASS_LIBRARY_NAME "UnityFbxExporter.dll")
124+
fbxexporters_compile_csharp(OUTPUT ${CLASS_LIBRARY_DEST}/${RUNTIME_CLASS_LIBRARY_NAME}
125+
EXTRA_ARGS
126+
"/target:library"
127+
SOURCES
128+
"${CMAKE_SOURCE_DIR}/Assets/FbxExporters/FbxPrefab.cs"
129+
REFERENCES
130+
"${CSHARP_MSCORLIB_LIBRARY}"
131+
"${CSHARP_SYSTEM_CORE_LIBRARY}"
132+
"${CSHARP_SYSTEM_LIBRARY}"
133+
"${CSHARP_UNITYEDITOR_LIBRARY}"
134+
"${CSHARP_UNITYENGINE_LIBRARY}"
135+
DEPENDS
136+
"${CLASS_LIBRARY_DEST}"
137+
)
138+
add_custom_target(UnityFbxExporterRuntimeDLL ALL DEPENDS ${CLASS_LIBRARY_DEST}/${RUNTIME_CLASS_LIBRARY_NAME})
139+
123140
set(EDITOR_CLASS_LIBRARY_NAME "UnityFbxExporterEditor.dll")
124141
fbxexporters_compile_csharp(OUTPUT ${CLASS_LIBRARY_DEST}/${EDITOR_CLASS_LIBRARY_NAME}
125142
EXTRA_ARGS
@@ -128,16 +145,19 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
128145
"${CMAKE_SOURCE_DIR}/Assets/FbxExporters/Editor/FbxExporter.cs"
129146
"${CMAKE_SOURCE_DIR}/Assets/FbxExporters/Editor/FbxExportSettings.cs"
130147
"${CMAKE_SOURCE_DIR}/Assets/FbxExporters/Editor/InstallIntegration.cs"
148+
"${CMAKE_SOURCE_DIR}/Assets/FbxExporters/Editor/FbxPrefabAutoUpdater.cs"
131149
REFERENCES
132150
"${CSHARP_MSCORLIB_LIBRARY}"
133151
"${CSHARP_SYSTEM_CORE_LIBRARY}"
134152
"${CSHARP_SYSTEM_LIBRARY}"
135153
"${CSHARP_UNITYEDITOR_LIBRARY}"
136154
"${CSHARP_UNITYENGINE_LIBRARY}"
137155
"${CMAKE_SOURCE_DIR}/Assets/FbxExporters/Editor/FbxSdk/Plugins/UnityFbxSdk.dll"
156+
${CLASS_LIBRARY_DEST}/${RUNTIME_CLASS_LIBRARY_NAME}
138157
DEPENDS
139158
"${CLASS_LIBRARY_DEST}"
140159
${FBXSDK_PACKAGE_TARGET}
160+
UnityFbxExporterRuntimeDLL
141161
)
142162
add_custom_target(UnityFbxExporterEditorDLL ALL DEPENDS ${CLASS_LIBRARY_DEST}/${EDITOR_CLASS_LIBRARY_NAME})
143163

@@ -175,12 +195,15 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release")
175195
DESTINATION .
176196
PATTERN "Editor/UnitTests" EXCLUDE
177197
PATTERN "FbxTurnTableBase.cs" EXCLUDE
198+
PATTERN "FbxPrefab.cs" EXCLUDE
178199
PATTERN "Editor/FbxExporter.cs" EXCLUDE
179200
PATTERN "Editor/FbxExportSettings.cs" EXCLUDE
180201
PATTERN "Editor/InstallIntegration.cs" EXCLUDE
181202
PATTERN "Editor/ReviewLastSavedModel.cs" EXCLUDE
182-
PATTERN "Editor/EditorRotate.cs" EXCLUDE)
203+
PATTERN "Editor/EditorRotate.cs" EXCLUDE
204+
PATTERN "Editor/FbxPrefabAutoUpdater.cs" EXCLUDE)
183205
install(FILES ${CLASS_LIBRARY_DEST}/${EDITOR_CLASS_LIBRARY_NAME} DESTINATION FbxExporters/Editor)
206+
install(FILES ${CLASS_LIBRARY_DEST}/${RUNTIME_CLASS_LIBRARY_NAME} DESTINATION FbxExporters)
184207
else()
185208
install(DIRECTORY ${CMAKE_SOURCE_DIR}/Assets/FbxExporters
186209
DESTINATION .)

0 commit comments

Comments
 (0)