tbamud/src/CMakeLists.txt
Roman Shapiro b2d38522e0
Added new easy way of building TbaMUD in the Visual Studio through the CMake (#127)
* Added new experimental MSVC build way through CMake

* Small build/README.md fix
2023-11-19 04:04:39 +01:00

26 lines
No EOL
505 B
CMake

cmake_minimum_required(VERSION 3.27)
# Set the project name
project(circle)
# Global definitions
if(MSVC)
# using Visual Studio C++
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
endif()
# circle itself
file(GLOB CIRCLE_SOURCES
"*.h"
"*.c"
)
add_executable(circle ${CIRCLE_SOURCES})
if(MSVC)
target_link_libraries(circle wsock32.lib)
set_target_properties(circle PROPERTIES
VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/.."
)
endif()