CMake/Tests/VSResource/CMakeLists.txt
David Cole 662756036e VS10: Escape double quote chars in defines for rc files (#11695)
To get rc defines to work in the VS10 IDE requires \" when
constructing PreprocessorDefinitions strings. This is different
than defines for cl.

Also, per-file rc defines were not being generated. Fix that, too.
2011-01-25 19:01:13 -05:00

14 lines
441 B
CMake

cmake_minimum_required(VERSION 2.8.3.20110118)
project (VSResource)
string(REPLACE "/INCREMENTAL:YES" ""
CMAKE_EXE_LINKER_FLAGS_DEBUG
"${CMAKE_EXE_LINKER_FLAGS_DEBUG}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test.txt
"${CMAKE_CURRENT_BINARY_DIR}/test with spaces.txt" COPYONLY)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_definitions(/DCMAKE_RCDEFINE="test with spaces.txt")
add_executable(VSResource main.cpp test.rc)