mirror of
https://github.com/reactos/CMake.git
synced 2024-12-18 09:07:49 +00:00
537020f958
InstallRequiredSystemLibraries does not install any dlls when used with VS 6 dashboards. Modify the ValidateBuild script to expect only 1 file when building with VS 6. Using "-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>" does not work when <INSTALL_DIR> evaluates to a long enough string. However, using "-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>" does work, even with the longer strings. So: make sure to include the ":PATH" when using this construct with ExternalProject calls so that they may install to the proper location on VS 6 builds. All existing calls that match "CMAKE_INSTALL_PREFIX.*INSTALL_DIR" include the ":PATH" after this commit. By the way: https://twitter.com/DLRdave/status/134339505397309440
62 lines
1.4 KiB
CMake
62 lines
1.4 KiB
CMake
cmake_minimum_required(VERSION 2.8)
|
|
project(mfc_driver)
|
|
|
|
include(CTest)
|
|
include(ExternalProject)
|
|
|
|
|
|
set(CMAKE_MFC_FLAG_VALUE "2")
|
|
configure_file(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.SharedMfcDll.txt
|
|
@ONLY
|
|
)
|
|
|
|
ExternalProject_Add(mfcShared
|
|
URL ${CMAKE_CURRENT_SOURCE_DIR}/mfc1
|
|
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
|
|
${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.SharedMfcDll.txt
|
|
<SOURCE_DIR>/CMakeLists.txt
|
|
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
|
|
)
|
|
|
|
|
|
set(CMAKE_MFC_FLAG_VALUE "1")
|
|
configure_file(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.StaticMfcLib.txt
|
|
@ONLY
|
|
)
|
|
|
|
ExternalProject_Add(mfcStatic
|
|
URL ${CMAKE_CURRENT_SOURCE_DIR}/mfc1
|
|
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
|
|
${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.StaticMfcLib.txt
|
|
<SOURCE_DIR>/CMakeLists.txt
|
|
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
|
|
)
|
|
|
|
|
|
set(binary_dir "${CMAKE_CURRENT_BINARY_DIR}")
|
|
configure_file(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/ValidateBuild.cmake.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/ValidateBuild.cmake
|
|
@ONLY
|
|
)
|
|
add_test(
|
|
NAME validate
|
|
COMMAND ${CMAKE_COMMAND}
|
|
-P "${CMAKE_CURRENT_BINARY_DIR}/ValidateBuild.cmake"
|
|
)
|
|
|
|
|
|
add_test(
|
|
NAME environment
|
|
COMMAND ${CMAKE_COMMAND} -E environment
|
|
)
|
|
|
|
|
|
message(STATUS "===== environment =====")
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E environment)
|
|
message(STATUS "===== /environment =====")
|