cmake_minimum_required(VERSION 3.1) project(AntriebDll) STRING(REGEX REPLACE "[/\\]+$" "" CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR}) STRING(REGEX REPLACE "[/\\]+$" "" CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(MODULE_FILES antrieb.h dllmain.cpp AntriebModel.h AntriebModel.cpp ) add_library(AntriebDll SHARED ${MODULE_FILES}) target_include_directories(AntriebDll PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) if("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64") set_target_properties(AntriebDll PROPERTIES SUFFIX ".64.dll") ENDIF()