PageRenderTime 43ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/src/oregoncore/CMakeLists.txt

https://bitbucket.org/oneb1t/crocoduckcore/
CMake | 93 lines | 69 code | 13 blank | 11 comment | 5 complexity | 3a7c326108f766861bfd672d02d338e6 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1
  1. # Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
  2. #
  3. # Copyright (C) 2009-2010 Oregon <http://www.oregoncore.org/>
  4. #
  5. # This file is free software; as a special exception the author gives
  6. # unlimited permission to copy and/or distribute it, with or without
  7. # modifications, as long as this notice is preserved.
  8. #
  9. # This program is distributed in the hope that it will be useful, but
  10. # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
  11. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. file(GLOB sources_localdir *.cpp *.h)
  13. set(oregon-core_SRCS
  14. ${oregon-core_SRCS}
  15. ${sources_localdir}
  16. )
  17. if( WIN32 )
  18. set(oregon-core_SRCS
  19. ${oregon-core_SRCS}
  20. ${sources_Debugging}
  21. OregonCore.rc
  22. )
  23. endif()
  24. include_directories(
  25. ${CMAKE_BINARY_DIR}
  26. ${CMAKE_SOURCE_DIR}/dep/include
  27. ${CMAKE_SOURCE_DIR}/dep/include/gsoap
  28. ${CMAKE_SOURCE_DIR}/src/collision
  29. ${CMAKE_SOURCE_DIR}/src/shared
  30. ${CMAKE_SOURCE_DIR}/src/shared/Database
  31. ${CMAKE_SOURCE_DIR}/src/framework
  32. ${CMAKE_SOURCE_DIR}/src/game
  33. ${CMAKE_SOURCE_DIR}/dep/recastnavigation/Detour
  34. ${ACE_INCLUDE_DIR}
  35. ${MYSQL_INCLUDE_DIR}
  36. ${OPENSSL_INCLUDE_DIR}
  37. )
  38. set(oregon-core_LINK_FLAGS "")
  39. add_executable(oregon-core ${oregon-core_SRCS})
  40. if( NOT WIN32 )
  41. add_definitions(-D_OREGON_CORE_CONFIG="${CONF_DIR}/oregoncore.conf")
  42. endif()
  43. add_dependencies(oregon-core revision.h)
  44. if( UNIX )
  45. set(oregon-core_LINK_FLAGS "-pthread ${oregon-core_LINK_FLAGS}")
  46. endif()
  47. set_target_properties(oregon-core PROPERTIES LINK_FLAGS "${oregon-core_LINK_FLAGS}")
  48. target_link_libraries(oregon-core
  49. game
  50. shared
  51. scripts
  52. oregonframework
  53. oregonsockets
  54. collision
  55. g3dlite
  56. gsoap
  57. Recast
  58. Detour
  59. ${READLINE_LIBRARY}
  60. ${TERMCAP_LIBRARY}
  61. ${ACE_LIBRARY}
  62. ${MYSQL_LIBRARY}
  63. ${OPENSSL_LIBRARIES}
  64. ${OPENSSL_EXTRA_LIBRARIES}
  65. ${ZLIB_LIBRARIES}
  66. ${OSX_LIBS}
  67. )
  68. if( WIN32 )
  69. add_custom_command(TARGET oregon-core
  70. POST_BUILD
  71. COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/oregoncore.conf.dist ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/
  72. )
  73. endif()
  74. if( UNIX )
  75. install(TARGETS oregon-core DESTINATION bin)
  76. install(FILES oregoncore.conf.dist DESTINATION etc)
  77. elseif( WIN32 )
  78. install(TARGETS oregon-core DESTINATION "${CMAKE_INSTALL_PREFIX}")
  79. install(FILES oregoncore.conf.dist DESTINATION "${CMAKE_INSTALL_PREFIX}")
  80. endif()