@@ -17,10 +17,6 @@ elseif (CMAKE_BUILD_TYPE STREQUAL "Debug")
17
17
endif ()
18
18
message (STATUS "Building for ${CMAKE_BUILD_TYPE} " )
19
19
20
- # has to be done before project is set, or else CMAKE_INSTALL_PREFIX will already be set to a default value
21
- SET (CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR} " CACHE PATH "Install path prefix" )
22
- MESSAGE (STATUS "CMAKE_INSTALL_PREFIX is: " ${CMAKE_INSTALL_PREFIX} )
23
-
24
20
if (NOT DEFINED PACKAGE_VERSION )
25
21
set (PACKAGE_VERSION "0.0.10a" )
26
22
endif ()
@@ -34,8 +30,6 @@ if (NOT DEFINED FBXSDK_PACKAGE_PATH)
34
30
set (FBXSDK_PACKAGE_PATH "${CMAKE_SOURCE_DIR} /../FbxSharpBuild/FbxSdk_${PACKAGE_VERSION} .unitypackage" )
35
31
endif ()
36
32
37
- project (UnityFbxExporter )
38
-
39
33
# promote warnings to errors
40
34
if (MSVC )
41
35
set (PROJECT_COMPILE_FLAGS "/WX" )
@@ -72,6 +66,10 @@ add_custom_target(
72
66
# Zip integrations folder
73
67
set (MAYA_INTEGRATION_TARGET zip_maya_integration )
74
68
set (MAYA_INTEGRATION_ZIP_NAME "unityoneclick_for_maya.zip" )
69
+
70
+ # remove existing zip file
71
+ file (REMOVE "${CMAKE_SOURCE_DIR} /Assets/FbxExporters/${MAYA_INTEGRATION_ZIP_NAME} " )
72
+
75
73
add_custom_command (OUTPUT ${MAYA_INTEGRATION_ZIP_NAME}
76
74
COMMAND ${CMAKE_COMMAND} -E tar "cfv" ${CMAKE_SOURCE_DIR} /Assets/FbxExporters/${MAYA_INTEGRATION_ZIP_NAME} --format=zip
77
75
"${CMAKE_SOURCE_DIR} /Assets/Integrations"
@@ -82,8 +80,6 @@ add_custom_target(${MAYA_INTEGRATION_TARGET} DEPENDS ${MAYA_INTEGRATION_ZIP_NAME
82
80
83
81
###########################################################################
84
82
# Add target for creating a package
85
- # TODO: synthesize the right project depending on configuration.
86
- # Make install does the right thing in all cases but it's overkill in release.
87
83
add_custom_command (
88
84
OUTPUT ${PACKAGE_PATH}
89
85
COMMAND "${UNITY_EDITOR_PATH} " -batchmode -projectPath ${CMAKE_SOURCE_DIR} -exportPackage Assets/FbxExporters Assets/FbxSdk ${PACKAGE_PATH} -quit
0 commit comments