Skip to content

Commit 9c7ba95

Browse files
committed
clean up cmakelists
1 parent 80e62b2 commit 9c7ba95

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

CMakeLists.txt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ elseif (CMAKE_BUILD_TYPE STREQUAL "Debug")
1717
endif()
1818
message(STATUS "Building for ${CMAKE_BUILD_TYPE}")
1919

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-
2420
if (NOT DEFINED PACKAGE_VERSION)
2521
set(PACKAGE_VERSION "0.0.10a")
2622
endif()
@@ -34,8 +30,6 @@ if (NOT DEFINED FBXSDK_PACKAGE_PATH)
3430
set(FBXSDK_PACKAGE_PATH "${CMAKE_SOURCE_DIR}/../FbxSharpBuild/FbxSdk_${PACKAGE_VERSION}.unitypackage")
3531
endif()
3632

37-
project (UnityFbxExporter)
38-
3933
# promote warnings to errors
4034
if(MSVC)
4135
set(PROJECT_COMPILE_FLAGS "/WX")
@@ -72,6 +66,10 @@ add_custom_target(
7266
# Zip integrations folder
7367
set(MAYA_INTEGRATION_TARGET zip_maya_integration)
7468
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+
7573
add_custom_command(OUTPUT ${MAYA_INTEGRATION_ZIP_NAME}
7674
COMMAND ${CMAKE_COMMAND} -E tar "cfv" ${CMAKE_SOURCE_DIR}/Assets/FbxExporters/${MAYA_INTEGRATION_ZIP_NAME} --format=zip
7775
"${CMAKE_SOURCE_DIR}/Assets/Integrations"
@@ -82,8 +80,6 @@ add_custom_target(${MAYA_INTEGRATION_TARGET} DEPENDS ${MAYA_INTEGRATION_ZIP_NAME
8280

8381
###########################################################################
8482
# 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.
8783
add_custom_command(
8884
OUTPUT ${PACKAGE_PATH}
8985
COMMAND "${UNITY_EDITOR_PATH}" -batchmode -projectPath ${CMAKE_SOURCE_DIR} -exportPackage Assets/FbxExporters Assets/FbxSdk ${PACKAGE_PATH} -quit

deps/cmake/FindUnity.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if (NOT DEFINED UNITY)
1515
set(UNITY "/Applications/Unity")
1616
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
1717
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
18-
set(UNITY "c:/Program Files/Unity2017.1.0f3")
18+
set(UNITY "c:/Program Files/Unity")
1919
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
2020
set(UNITY "/opt/Unity")
2121
endif()

0 commit comments

Comments
 (0)