diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-05-30 15:31:56 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-05-30 15:32:33 +0200 |
commit | f72c52f142a71c8ebeef7f364bb0ee5222ca471c (patch) | |
tree | 1c3203079840b3e168b03aa34d1757ff0c7a14eb /src/CMakeLists.txt | |
parent | e96e0df632c5fb91e4391b263831f02741370bb3 (diff) | |
download | cmocka-f72c52f142a71c8ebeef7f364bb0ee5222ca471c.tar.gz cmocka-f72c52f142a71c8ebeef7f364bb0ee5222ca471c.tar.xz cmocka-f72c52f142a71c8ebeef7f364bb0ee5222ca471c.zip |
cmake: Disable reading the DLL locations on non WIN32 platforms
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 67c9bc2..51a3b21 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -102,17 +102,19 @@ if (WITH_STATIC_LIB) ) endif (WITH_STATIC_LIB) -if (POLICY CMP0026) - cmake_policy(SET CMP0026 OLD) -endif() +if (WIN32) + if (POLICY CMP0026) + cmake_policy(SET CMP0026 OLD) + endif() # # In order to run tests we will need to set the approriate environment # variable so that the test program can locate its dependent DLL's. First # we want to know what directory our dependent DLL was installed into: # -get_target_property(_cmocka_dir cmocka_shared LOCATION_${CMOCKA_BUILD_TYPE}) -get_filename_component(_cmocka_path "${_cmocka_dir}" PATH) -file(TO_NATIVE_PATH "${_cmocka_path}" _cmocka_path_native) + get_target_property(_cmocka_dir cmocka_shared LOCATION_${CMOCKA_BUILD_TYPE}) + get_filename_component(_cmocka_path "${_cmocka_dir}" PATH) + file(TO_NATIVE_PATH "${_cmocka_path}" _cmocka_path_native) -set(CMOCKA_DLL_PATH "${_cmocka_path_native}" PARENT_SCOPE) + set(CMOCKA_DLL_PATH "${_cmocka_path_native}" PARENT_SCOPE) +endif() |