CMakeLists.txt 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. include_directories(${CMAKE_SOURCE_DIR}/Source)
  2. include_directories ( ${CMAKE_SOURCE_DIR}/Source/ThirdParty
  3. ${CMAKE_SOURCE_DIR}/Source/ThirdParty/rapidjson/include
  4. ${CMAKE_SOURCE_DIR}/Source/ThirdParty/kNet/include
  5. ${CMAKE_SOURCE_DIR}/Source/ThirdParty/FreeType/include
  6. ${CMAKE_SOURCE_DIR}/Source/ThirdParty/Box2D )
  7. # Define source files
  8. file (GLOB SOURCE_FILES Source/*.cpp Source/*.h)
  9. if (MSVC)
  10. add_definitions(-DATOMIC_WIN32_CONSOLE)
  11. endif()
  12. add_executable(FeatureExamples ${SOURCE_FILES})
  13. target_link_libraries(FeatureExamples ${ATOMIC_LINK_LIBRARIES})
  14. # Copy AtomicTool to Artifacts
  15. add_custom_command( TARGET FeatureExamples POST_BUILD
  16. COMMAND "${CMAKE_COMMAND}"
  17. ARGS -E make_directory \"${CMAKE_SOURCE_DIR}/Artifacts/Examples/CPlusPlus\"
  18. COMMAND "${CMAKE_COMMAND}"
  19. ARGS -E copy_if_different \"$<TARGET_FILE:FeatureExamples>\" \"${CMAKE_SOURCE_DIR}/Artifacts/Examples/CPlusPlus/\"
  20. COMMENT "Copying FeatureExamples to Build Artifacts" )
  21. if (MSVC)
  22. # pre-Windows 8 can't count on D3DCompiler_47.dll being on system
  23. add_custom_command (TARGET FeatureExamples POST_BUILD
  24. COMMAND ${CMAKE_COMMAND}
  25. ARGS -E copy_if_different \"${D3DCOMPILER_47_DLL}\" \"$<TARGET_FILE_DIR:FeatureExamples>/D3DCompiler_47.dll\"
  26. COMMAND ${CMAKE_COMMAND}
  27. ARGS -E copy_if_different \"${D3DCOMPILER_47_DLL}\" \"${CMAKE_SOURCE_DIR}/Artifacts/Examples/CPlusPlus/D3DCompiler_47.dll\" )
  28. endif(MSVC)