Fix OsdPolySmoothNode build

- remove cruft
- add installation rule for mel script
This commit is contained in:
manuelk 2013-11-14 11:37:35 -08:00
parent dc540e37cc
commit 5a473033f2

View File

@ -45,14 +45,12 @@ include_directories(
${MAYA_INCLUDE_DIRS} ${MAYA_INCLUDE_DIRS}
) )
set(SHADER_FILES
)
set(SOURCE_FILES set(SOURCE_FILES
osdPolySmooth.cpp osdPolySmooth.cpp
) )
set(HEADER_FILES set(HEADER_FILES
osdPolySmooth.h
) )
if(UNIX) if(UNIX)
@ -66,9 +64,7 @@ if(UNIX)
) )
set(PLATFORM_LINK_FLAGS set(PLATFORM_LINK_FLAGS
) )
endif(UNIX) elseif(WIN32)
if(WIN32)
set(PLATFORM_COMPILE_FLAGS set(PLATFORM_COMPILE_FLAGS
/D_AFXDLL /D_AFXDLL
/DNT_PLUGIN /DNT_PLUGIN
@ -80,7 +76,7 @@ if(WIN32)
set(PLATFORM_LINK_FLAGS set(PLATFORM_LINK_FLAGS
"/export:initializePlugin /export:uninitializePlugin" "/export:initializePlugin /export:uninitializePlugin"
) )
endif(WIN32) endif()
add_definitions( add_definitions(
${PLATFORM_COMPILE_FLAGS} ${PLATFORM_COMPILE_FLAGS}
@ -89,8 +85,6 @@ add_definitions(
add_library(maya_polySmoothNode SHARED add_library(maya_polySmoothNode SHARED
${SOURCE_FILES} ${SOURCE_FILES}
${HEADER_FILES} ${HEADER_FILES}
${SHADER_FILES}
${INC_FILES}
) )
set_target_properties(maya_polySmoothNode set_target_properties(maya_polySmoothNode
@ -110,3 +104,23 @@ target_link_libraries(maya_polySmoothNode
) )
install(TARGETS maya_polySmoothNode DESTINATION ${CMAKE_PLUGINDIR_BASE}) install(TARGETS maya_polySmoothNode DESTINATION ${CMAKE_PLUGINDIR_BASE})
add_custom_target(maya_polySmoothNode_melScripts
COMMAND
${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/osdPolySmooth.mel ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/osdPolySmooth.mel
)
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/osdPolySmooth.mel
DESTINATION
${CMAKE_PLUGINDIR_BASE}
)
add_custom_target(osdPolySmoothNode
ALL
DEPENDS
maya_polySmoothNode maya_polySmoothNode_melScripts
)