2019-03-11 00:00:27 +01:00
|
|
|
cmake_minimum_required(VERSION 3.1)
|
|
|
|
project(checksum C)
|
|
|
|
|
|
|
|
if (NOT CMAKE_BUILD_TYPE)
|
|
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
|
|
|
add_executable(checksumtool
|
2021-10-05 09:15:29 +02:00
|
|
|
src/checksum.c
|
2019-03-11 00:00:27 +01:00
|
|
|
)
|
|
|
|
target_compile_definitions(checksumtool PUBLIC EXECUTABLE=1)
|
|
|
|
|
|
|
|
add_library(checksum
|
2021-10-05 09:15:29 +02:00
|
|
|
src/checksum.c
|
2019-03-11 00:00:27 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
IF ( MSVC )
|
|
|
|
MESSAGE ( STATUS "Setting MSVC MT switches")
|
|
|
|
string (REPLACE
|
|
|
|
"/MDd"
|
|
|
|
"/MTd"
|
|
|
|
CMAKE_C_FLAGS_DEBUG
|
|
|
|
${CMAKE_C_FLAGS_DEBUG}
|
|
|
|
)
|
|
|
|
string (REPLACE
|
|
|
|
"/MDd"
|
|
|
|
"/MTd"
|
|
|
|
CMAKE_C_FLAGS_RELEASE
|
|
|
|
${CMAKE_C_FLAGS_RELEASE}
|
|
|
|
)
|
|
|
|
endif ()
|
|
|
|
|