You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
591 B
16 lines
591 B
3 years ago
|
cmake_minimum_required(VERSION 3.20)
|
||
|
project(VSManagedCustomCommand CXX)
|
||
|
|
||
|
add_custom_command(OUTPUT middle.txt
|
||
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/example.txt ${CMAKE_CURRENT_BINARY_DIR}/middle.txt
|
||
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/example.txt
|
||
|
)
|
||
|
|
||
|
add_custom_command(OUTPUT example.cxx
|
||
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/middle.txt ${CMAKE_CURRENT_BINARY_DIR}/example.cxx
|
||
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/middle.txt
|
||
|
)
|
||
|
|
||
|
add_library(example SHARED example.cxx)
|
||
|
set_property(TARGET example PROPERTY COMMON_LANGUAGE_RUNTIME "")
|