9
3

CMakeLists.txt 546 B

12345678910111213141516
  1. cmake_minimum_required(VERSION 2.8)
  2. project (LoginServer)
  3. file(GLOB LOGIN_SRCS "*.cpp" "*.h")
  4. file(GLOB COMMON_SRCS "../common/*.cpp" "../common/*.h")
  5. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
  6. find_package(MySQL)
  7. find_package(Threads)
  8. find_package(ZLIB)
  9. add_definitions(-DEQ2 -DLOGIN)
  10. add_executable(login ${LOGIN_SRCS} ${COMMON_SRCS})
  11. target_include_directories(login PUBLIC ${MySQL_INCLUDE_DIRS} ../common/)
  12. target_link_libraries(login PUBLIC ${MySQL_LIBRARIES} ${ZLIB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})