/src/oregoncore/CMakeLists.txt
CMake | 93 lines | 69 code | 13 blank | 11 comment | 5 complexity | 3a7c326108f766861bfd672d02d338e6 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1
- # Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
- #
- # Copyright (C) 2009-2010 Oregon <http://www.oregoncore.org/>
- #
- # This file is free software; as a special exception the author gives
- # unlimited permission to copy and/or distribute it, with or without
- # modifications, as long as this notice is preserved.
- #
- # This program is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
- # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- file(GLOB sources_localdir *.cpp *.h)
- set(oregon-core_SRCS
- ${oregon-core_SRCS}
- ${sources_localdir}
- )
- if( WIN32 )
- set(oregon-core_SRCS
- ${oregon-core_SRCS}
- ${sources_Debugging}
- OregonCore.rc
- )
- endif()
- include_directories(
- ${CMAKE_BINARY_DIR}
- ${CMAKE_SOURCE_DIR}/dep/include
- ${CMAKE_SOURCE_DIR}/dep/include/gsoap
- ${CMAKE_SOURCE_DIR}/src/collision
- ${CMAKE_SOURCE_DIR}/src/shared
- ${CMAKE_SOURCE_DIR}/src/shared/Database
- ${CMAKE_SOURCE_DIR}/src/framework
- ${CMAKE_SOURCE_DIR}/src/game
- ${CMAKE_SOURCE_DIR}/dep/recastnavigation/Detour
- ${ACE_INCLUDE_DIR}
- ${MYSQL_INCLUDE_DIR}
- ${OPENSSL_INCLUDE_DIR}
- )
- set(oregon-core_LINK_FLAGS "")
- add_executable(oregon-core ${oregon-core_SRCS})
- if( NOT WIN32 )
- add_definitions(-D_OREGON_CORE_CONFIG="${CONF_DIR}/oregoncore.conf")
- endif()
- add_dependencies(oregon-core revision.h)
- if( UNIX )
- set(oregon-core_LINK_FLAGS "-pthread ${oregon-core_LINK_FLAGS}")
- endif()
- set_target_properties(oregon-core PROPERTIES LINK_FLAGS "${oregon-core_LINK_FLAGS}")
- target_link_libraries(oregon-core
- game
- shared
- scripts
- oregonframework
- oregonsockets
- collision
- g3dlite
- gsoap
- Recast
- Detour
- ${READLINE_LIBRARY}
- ${TERMCAP_LIBRARY}
- ${ACE_LIBRARY}
- ${MYSQL_LIBRARY}
- ${OPENSSL_LIBRARIES}
- ${OPENSSL_EXTRA_LIBRARIES}
- ${ZLIB_LIBRARIES}
- ${OSX_LIBS}
- )
- if( WIN32 )
- add_custom_command(TARGET oregon-core
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/oregoncore.conf.dist ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/
- )
- endif()
- if( UNIX )
- install(TARGETS oregon-core DESTINATION bin)
- install(FILES oregoncore.conf.dist DESTINATION etc)
- elseif( WIN32 )
- install(TARGETS oregon-core DESTINATION "${CMAKE_INSTALL_PREFIX}")
- install(FILES oregoncore.conf.dist DESTINATION "${CMAKE_INSTALL_PREFIX}")
- endif()