Advertisement
Guest User

Untitled

a guest
Jul 5th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. #
  2. # Copyright (c) 2015 Pavlo Lavrenenko, Alibek Omarov
  3. #
  4. # Permission is hereby granted, free of charge, to any person obtaining a copy
  5. # of this software and associated documentation files (the "Software"), to deal
  6. # in the Software without restriction, including without limitation the rights
  7. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. # copies of the Software, and to permit persons to whom the Software is
  9. # furnished to do so, subject to the following conditions:
  10. #
  11. # The above copyright notice and this permission notice shall be included in all
  12. # copies or substantial portions of the Software.
  13. #
  14. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  20. # SOFTWARE.
  21. #
  22.  
  23. cmake_minimum_required(VERSION 2.6.0)
  24. project (XASH_LAUNCHER)
  25.  
  26. # set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
  27. set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
  28. set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
  29. set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
  30. set (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os")
  31. set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -O3")
  32.  
  33. if(PANDORA)
  34. add_definitions(-DPANDORA)
  35. endif()
  36.  
  37. if(XASH_SDL)
  38. include(FindPkgConfig)
  39. pkg_search_module(SDL2 REQUIRED sdl2)
  40. include_directories(${SDL2_INCLUDE_DIRS})
  41.  
  42. add_definitions(-DXASH_SDL)
  43. endif()
  44.  
  45. set (XASH_LAUNCHER_EXECUTABLE xash3d)
  46.  
  47. file (GLOB XASH_LAUNCHER_SOURCES *.cpp)
  48.  
  49. add_executable (${XASH_LAUNCHER_EXECUTABLE} ${XASH_LAUNCHER_SOURCES})
  50.  
  51. if(XASH_SDL)
  52. target_link_libraries(${XASH_LAUNCHER_EXECUTABLE} ${SDL2_LIBRARIES})
  53. endif()
  54.  
  55. target_link_libraries(${XASH_LAUNCHER_EXECUTABLE}
  56. ${CMAKE_DL_LIBS})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement