-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
25 lines (20 loc) · 854 Bytes
/
CMakeLists.txt
File metadata and controls
25 lines (20 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
cmake_minimum_required(VERSION 3.20)
project(AutoDaveSave LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Build one DLL (Windows) or shared library (other platforms)
add_library(AutoDaveSave SHARED
AudoDaveSave.cpp
)
# Optional: use module definition file for exports (MSVC)
if (MSVC AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Exports.def")
set_target_properties(AutoDaveSave PROPERTIES
LINK_FLAGS "/DEF:${CMAKE_CURRENT_SOURCE_DIR}/Exports.def"
)
endif()
# Put output artifacts in build temp folder under /out
set_target_properties(AutoDaveSave PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/out" # .dll
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/out" # .lib import libs or non-Windows shared libs
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/out" # static/import libs
)