CMakeLists.txt 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. cmake_minimum_required(VERSION 2.8)
  2. project(crown-tools)
  3. set (INCLUDES
  4. ${CMAKE_SOURCE_DIR}/tools
  5. ${CMAKE_SOURCE_DIR}/tools/core
  6. ${CMAKE_SOURCE_DIR}/tools/core/formats
  7. ${CMAKE_SOURCE_DIR}/tools/core/strings
  8. ${CMAKE_SOURCE_DIR}/tools/compilers
  9. ${CMAKE_SOURCE_DIR}/tools/compilers/tga
  10. ${CMAKE_SOURCE_DIR}/tools/compilers/wav
  11. ${CMAKE_SOURCE_DIR}/tools/compilers/dae
  12. )
  13. set (CORE_SRC
  14. core/Args.cpp
  15. )
  16. set (CORE_HEADERS
  17. core/Args.h
  18. core/Assert.h
  19. core/Types.h
  20. core/formats/PixelFormat.h
  21. core/formats/ResourceFormat.h
  22. core/formats/TextureFormat.h
  23. core/formats/SoundFormat.h
  24. core/strings/StringUtils.h
  25. core/strings/Hash.h
  26. core/strings/Path.h
  27. )
  28. set (COMPILERS_SRC
  29. compilers/Compiler.cpp
  30. compilers/tga/TGACompiler.cpp
  31. compilers/wav/WAVCompiler.cpp
  32. compilers/dae/DAECompiler.cpp
  33. compilers/dae/tinyxml2.cpp
  34. )
  35. set (COMPILER_HEADERS
  36. compilers/Compiler.h
  37. compilers/tga/TGACompiler.h
  38. compilers/wav/WAVCompiler.h
  39. compilers/dae/DAECompiler.h
  40. compilers/dae/tinyxml2.h
  41. )
  42. set (TOOLS_SRC
  43. ${CORE_SRC}
  44. ${COMPILERS_SRC}
  45. )
  46. set (TOOLS_HEADERS
  47. ${CORE_HEADERS}
  48. ${COMPILERS_HEADERS}
  49. )
  50. include_directories(${INCLUDES})
  51. configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/Config.h)
  52. # tools library
  53. add_library(crown-tools ${TOOLS_SRC} ${TOOLS_HEADERS})
  54. # resource-hash
  55. add_executable(resource-hash cli/resource-hash.cpp)
  56. target_link_libraries(resource-hash crown-tools)
  57. # resource-compiler
  58. add_executable(resource-compiler cli/resource-compiler.cpp)
  59. target_link_libraries(resource-compiler crown-tools)
  60. # Install tools
  61. install (TARGETS crown-tools DESTINATION tools)
  62. install (TARGETS resource-hash DESTINATION tools)
  63. install (TARGETS resource-compiler DESTINATION tools)
  64. install (FILES cli/resource-compiler.py PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
  65. GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE DESTINATION tools)
  66. add_subdirectory(gui/resource-browser)
  67. add_subdirectory(gui/toolchain)
  68. add_subdirectory(gui/console)
  69. add_subdirectory(pycrown)