CMakeLists.txt 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Define target name
  2. set (TARGET_NAME AngelScript)
  3. # Define source files
  4. file (GLOB CPP_FILES
  5. source/*.cpp
  6. )
  7. file (GLOB H_FILES
  8. include/*.h source/*.h
  9. )
  10. if (IOS OR ANDROID OR RASPI)
  11. enable_language (ASM)
  12. if (IOS)
  13. set (ASM_FILES source/as_callfunc_arm_xcode.S)
  14. else ()
  15. set (ASM_FILES source/as_callfunc_arm_gcc.S)
  16. endif ()
  17. endif ()
  18. if (MSVC AND URHO3D_64BIT)
  19. enable_language (ASM_MASM)
  20. # Commented out due to cmake bug
  21. #set (ASM_FILES source/as_callfunc_x64_msvc_asm.asm)
  22. # As a temporary workaround
  23. add_custom_command (OUTPUT as_callfunc_x64_msvc_asm.obj COMMAND ${CMAKE_ASM_MASM_COMPILER} -Fo ${CMAKE_CURRENT_BINARY_DIR}/as_callfunc_x64_msvc_asm.obj -c ${CMAKE_CURRENT_SOURCE_DIR}/source/as_callfunc_x64_msvc_asm.asm DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/source/as_callfunc_x64_msvc_asm.asm COMMENT "Temporary workaround for MASM")
  24. set (ASM_FILES ${CMAKE_CURRENT_BINARY_DIR}/as_callfunc_x64_msvc_asm.obj ${CMAKE_CURRENT_SOURCE_DIR}/source/as_callfunc_x64_msvc_asm.asm)
  25. endif ()
  26. set (SOURCE_FILES ${CPP_FILES} ${ASM_FILES} ${H_FILES})
  27. # Install dependency for Engine/Script/APITemplates.h
  28. install (DIRECTORY include/ DESTINATION ${DEST_INCLUDE_DIR}/AngelScript ${DEST_PERMISSIONS} FILES_MATCHING PATTERN *.h) # Note: the trailing slash is significant
  29. set (INSTALL_INCLUDE_DIRS ${INSTALL_INCLUDE_DIRS} AngelScript PARENT_SCOPE)
  30. # Define dependency libs
  31. set (INCLUDE_DIRS_ONLY include)
  32. # Setup target
  33. setup_library ()