DLLs renaming

Added by Joaquim over 5 years ago

Florian,

Following our mail exchange on DLLs renaming I found that cmake foresees it with use of the property RUNTIME_OUTPUT_NAME

http://cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:RUNTIME_OUTPUT_NAME

and indeed it works when I change the src/CMakeList.txt to

set_target_properties (gmtlib
PROPERTIES
OUTPUT_NAME gmt
PREFIX lib
IMPORT_PREFIX lib
RUNTIME_OUTPUT_NAME gmt_w64
VERSION ${GMT_PACKAGE_VERSION}
...

However, such a optional change is not be made there so I added it to my ConfigUser.cmake as

set_target_properties(gmtlib PROPERTIES RUNTIME_OUTPUT_NAME gmt_w64)

but it errors with

CMake Error at cmake/ConfigUser.cmake:43 (set_target_properties):
set_target_properties Can not find target to add properties to: gmtlib

Is it because 'gmtlib' is an unknown variable to ConfigUser.cmake?


Replies (1)

RE: DLLs renaming - Added by Florian over 5 years ago

set_target_properties works only in the current directory. Hence you can only use the command in src/CMakeLists.txt. Anyway, the target would be unknown ConfigUser.cmake because it is processed first.

(1-1/1)