Skip to content

Instantly share code, notes, and snippets.

@kilon kilon/CMakeList.txt
Created Oct 17, 2018

Embed
What would you like to do?
example DLL
set(INC
.
../blenfont
../blenkernel
../blenlib
../blenloader
../blentranslation
../depsgraph
../editors/include
../editors/interface
../draw
../gpu
../imbuf
../makesdna
../makesrna
../python
../windowmanager
../../../intern/guardedalloc
../../../intern/glew-mx
)
set(SRC
ephestos.c
ephestos.h
)
include_directories(${INC})
if(WIN32)
add_library(ephestos MODULE ${SRC} )
message("Building ephestos.dll for windows and placing at ${CMAKE_BINARY_DIR}")
#file(COPY ${CMAKE_BINARY_DIR}/lib/Debug/ephestos.dll DESTINATION "." )
add_custom_command(TARGET ephestos POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/lib/Debug/ephestos.dll ${CMAKE_BINARY_DIR}/bin/Debug/2.80/datafiles/ephestos/ephestos.dll)
elseif(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin")
add_library(ephestos SHARED ${SRC} )
message("Building ephestos.dll for MacOS and placing at ${CMAKE_BINARY_DIR}")
add_custom_command(TARGET ephestos POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/lib/libephestos.dylib ${CMAKE_BINARY_DIR}/bin/blender.app/Contents/Resources/2.80/datafiles/ephestos/ephestos.dll)
endif()
message("-- PLATFORM : " ${CMAKE_HOST_SYSTEM_NAME})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.