Skip to content

Commit 9756517

Browse files
committed
install project into build folder
make it easy to package with the DLLs
1 parent b0e4794 commit 9756517

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

CMakeLists.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77

88
cmake_minimum_required (VERSION 3.8)
99

10+
SET(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/FbxExporterProject/Assets" CACHE PATH "Install path prefix")
11+
MESSAGE(STATUS "CMAKE_INSTALL_PREFIX is: " ${CMAKE_INSTALL_PREFIX})
12+
13+
project (UnityFbxExporterEditorDLL)
14+
1015
# Default is a release build.
1116
if (NOT CMAKE_BUILD_TYPE)
1217
# CMAKE_BUILD_TYPE is special, so we have to CACHE FORCE to actually set it,
@@ -173,3 +178,23 @@ add_custom_target(unitypackage DEPENDS ${PACKAGE_PATH} ${FBXSDK_PACKAGE_TARGET}
173178

174179
enable_testing()
175180
add_test(NAME run-all COMMAND "${UNITY_EDITOR_PATH}" -batchmode -projectPath ${CMAKE_SOURCE_DIR} runEditorTests -quit)
181+
182+
183+
############################################################################
184+
# Install project into build folder
185+
186+
if(CMAKE_BUILD_TYPE STREQUAL "Release")
187+
install(DIRECTORY ${CMAKE_SOURCE_DIR}/Assets/FbxExporters
188+
DESTINATION .
189+
PATTERN "Editor/UnitTests" EXCLUDE
190+
PATTERN "FbxTurnTableBase.cs" EXCLUDE
191+
PATTERN "Editor/FbxExporter.cs" EXCLUDE
192+
PATTERN "Editor/FbxExportSettings.cs" EXCLUDE
193+
PATTERN "Editor/InstallIntegration.cs" EXCLUDE
194+
PATTERN "Editor/ReviewLastSavedModel.cs" EXCLUDE)
195+
install(FILES ${CLASS_LIBRARY_DEST}/${RUNTIME_CLASS_LIBRARY_NAME} DESTINATION FbxExporters)
196+
install(FILES ${CLASS_LIBRARY_DEST}/${EDITOR_CLASS_LIBRARY_NAME} DESTINATION FbxExporters/Editor)
197+
else()
198+
install(DIRECTORY ${CMAKE_SOURCE_DIR}/Assets/FbxExporters
199+
DESTINATION .)
200+
endif()

0 commit comments

Comments
 (0)