cmake_minimum_required(VERSION 3.8.2) 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}) #include(GenerateExportHeader) #generate_export_header(DLib) target_include_directories(AntriebDll PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})