diff options
author | José Fonseca <jfonseca@vmware.com> | 2014-06-13 14:17:36 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2014-06-13 14:31:40 +0100 |
commit | 5bde5f0b2ee3cc3e53ac8c71bada752c55fe5cc8 (patch) | |
tree | 64282209ebff43f8511eb80b1551b39a7d23cada /cli | |
parent | d8ac834805d103a545f82163ef50c60c13881cb3 (diff) |
cmake: Fix CMP0043 violations.
Diffstat (limited to 'cli')
-rw-r--r-- | cli/CMakeLists.txt | 19 | ||||
-rw-r--r-- | cli/cli_resources.cpp | 4 |
2 files changed, 6 insertions, 17 deletions
diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index 727cd7f8..9198a8f5 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -36,22 +36,11 @@ target_link_libraries (apitrace ) if (NOT CMAKE_CROSSCOMPILING) - set_target_properties (apitrace PROPERTIES - # On debug builds tell where the source is so that scripts can be found - COMPILE_DEFINITIONS_DEBUG APITRACE_SOURCE_DIR="${CMAKE_SOURCE_DIR}" + # On debug builds tell where the source is so that scripts can be found + # http://www.cmake.org/cmake/help/v3.0/policy/CMP0043.html + target_compile_definitions (apitrace PRIVATE + $<$<CONFIG:Debug>:APITRACE_SOURCE_DIR="${CMAKE_SOURCE_DIR}"> ) endif () -if (MSVC AND NOT CMAKE_GENERATOR STREQUAL "Ninja") - # On MSVC builds tell which subdirectory the binaries with be (for each - # configuration) - set_target_properties (apitrace PROPERTIES - COMPILE_DEFINITIONS_DEBUG APITRACE_CONFIGURATION_SUBDIR="Debug" - COMPILE_DEFINITIONS_RELEASE APITRACE_CONFIGURATION_SUBDIR="Release" - COMPILE_DEFINITIONS_MINSIZEREL APITRACE_CONFIGURATION_SUBDIR="MinSizeRel" - COMPILE_DEFINITIONS_RELWITHDEBINFO APITRACE_CONFIGURATION_SUBDIR="RelWithDebInfo" - ) -endif () - - install (TARGETS apitrace RUNTIME DESTINATION bin) diff --git a/cli/cli_resources.cpp b/cli/cli_resources.cpp index d6d0a55d..e946c205 100644 --- a/cli/cli_resources.cpp +++ b/cli/cli_resources.cpp @@ -101,11 +101,11 @@ findWrapper(const char *wrapperFilename, bool verbose) // Try relative build directory // XXX: Just make build and install directory layout match wrapperPath = processDir; -#if defined(APITRACE_CONFIGURATION_SUBDIR) +#if defined(CMAKE_INTDIR) // Go from `Debug\apitrace.exe` to `wrappers\Debug\foo.dll` on MSVC builds. wrapperPath.join(".."); wrapperPath.join("wrappers"); - wrapperPath.join(APITRACE_CONFIGURATION_SUBDIR); + wrapperPath.join(CMAKE_INTDIR); #else wrapperPath.join("wrappers"); #endif |