SHARE
TWEET

slap-client/CMakesList.txt

a guest Aug 27th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # File generated at : 21:51:35, Tue 27 Aug
  2. # Converted Project : C:/Users/Swordfish/source/repos/slap\slap-client/slap-client.vcxproj
  3. cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
  4.  
  5. ##################### Variables ############################
  6. # Change if you want modify path or other values           #
  7. ############################################################
  8.  
  9. # Project
  10. get_filename_component(PROJECT_DIR "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
  11. set(DEPENDENCIES_DIR ${PROJECT_DIR}/dependencies)
  12. set(PROJECT_NAME slapclient)
  13.  
  14.  
  15. # Outputs
  16. set(OUTPUT_DEBUG ${PROJECT_DIR}/bin)
  17. set(OUTPUT_RELEASE ${PROJECT_DIR}/bin)
  18.  
  19. ################# CMake Project ############################
  20. # The main options of project                              #
  21. ############################################################
  22.  
  23. project(${PROJECT_NAME} CXX)
  24.  
  25. # Define Release by default.
  26. if(NOT CMAKE_BUILD_TYPE)
  27.   set(CMAKE_BUILD_TYPE "Release")
  28.   message(STATUS "Build type not specified: Use Release by default.")
  29. endif(NOT CMAKE_BUILD_TYPE)
  30.  
  31. ############## Artefacts Output ############################
  32. # Defines outputs , depending BUILD TYPE                   #
  33. ############################################################
  34.  
  35. if(CMAKE_BUILD_TYPE STREQUAL "Debug")
  36.   set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_DIR}/${OUTPUT_DEBUG}")
  37.   set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_DIR}/${OUTPUT_DEBUG}")
  38.   set(CMAKE_EXECUTABLE_OUTPUT_DIRECTORY "${PROJECT_DIR}/${OUTPUT_DEBUG}")
  39. else()
  40.   set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_DIR}/${OUTPUT_RELEASE}")
  41.   set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_DIR}/${OUTPUT_RELEASE}")
  42.   set(CMAKE_EXECUTABLE_OUTPUT_DIRECTORY "${PROJECT_DIR}/${OUTPUT_RELEASE}")
  43. endif()
  44.  
  45. # Messages
  46. message("${PROJECT_NAME}: MAIN PROJECT: ${CMAKE_PROJECT_NAME}")
  47. message("${PROJECT_NAME}: CURR PROJECT: ${CMAKE_CURRENT_SOURCE_DIR}")
  48. message("${PROJECT_NAME}: CURR BIN DIR: ${CMAKE_CURRENT_BINARY_DIR}")
  49.  
  50. ############### Files & Targets ############################
  51. # Files of project and target to build                     #
  52. ############################################################
  53.  
  54. # Source Files
  55. set(SRC_FILES
  56.     src\client.cpp
  57.     src\main.cpp
  58. )
  59. source_group("Sources" FILES ${SRC_FILES})
  60.  
  61. # Header Files
  62. set(HEADERS_FILES
  63.     include\client.h
  64. )
  65. source_group("Headers" FILES ${HEADERS_FILES})
  66.  
  67. # Add executable to build.
  68. add_executable(${PROJECT_NAME}
  69.    ${SRC_FILES} ${HEADERS_FILES}
  70. )
  71.  
  72. ######################### Flags ############################
  73. # Defines Flags for Windows and Linux                      #
  74. ############################################################
  75.  
  76. if(NOT MSVC)
  77.    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  78.    if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
  79.        set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
  80.    endif()
  81. endif(NOT MSVC)
  82.  
  83. # Preprocessor definitions
  84. if(CMAKE_BUILD_TYPE STREQUAL "Debug")
  85.     target_compile_definitions(${PROJECT_NAME} PRIVATE
  86.    -D_DEBUG
  87.    -D_CONSOLE
  88.     )
  89.     if(MSVC)
  90.         target_compile_options(${PROJECT_NAME} PRIVATE  /W3 /MD /Od /Zi /EHsc)
  91.     endif()
  92. endif()
  93.  
  94. if(CMAKE_BUILD_TYPE STREQUAL "Release")
  95.     target_compile_definitions(${PROJECT_NAME} PRIVATE
  96.    -DNDEBUG
  97.    -D_CONSOLE
  98.     )
  99.     if(MSVC)
  100.         target_compile_options(${PROJECT_NAME} PRIVATE  /W3 /GL /Oi /Gy /Zi /EHsc)
  101.     endif()
  102. endif()
  103.  
  104. ########### Link & Dependencies ############################
  105. # Add project dependencies and Link to project             #
  106. ############################################################
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top