-
Notifications
You must be signed in to change notification settings - Fork 6
/
GetNames.cmake
51 lines (48 loc) · 1.39 KB
/
GetNames.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
function(get_lib_names lib_names base)
set(${lib_names})
foreach(__glnname ${ARGN})
if(WIN32)
set(__glnn ${__glnname}.lib)
else()
set(__glnn lib${__glnname}.a)
endif()
list(APPEND ${lib_names} "${base}${__glnn}")
endforeach()
set(lib_names ${lib_names} PARENT_SCOPE)
endfunction()
function(get_dll_names dll_names base)
set(${dll_names})
foreach(__glnname ${ARGN})
if(WIN32)
set(__glnn ${__glnname}.dll)
else()
set(__glnn lib${__glnname}.so)
endif()
list(APPEND ${dll_names} "${base}${__glnn}")
endforeach()
set(dll_names ${dll_names} PARENT_SCOPE)
endfunction()
function(get_script_names script_names base)
set(${script_names})
foreach(__glnname ${ARGN})
if(WIN32)
set(__glnn ${__glnname}.bat)
else()
set(__glnn ${__glnname}.sh)
endif()
list(APPEND ${script_names} "${base}${__glnn}")
endforeach()
set(script_names ${script_names} PARENT_SCOPE)
endfunction()
function(get_exe_names exe_names base)
set(${exe_names})
foreach(__glnname ${ARGN})
if(WIN32)
set(__glnn ${__glnname}.exe)
else()
set(__glnn ${__glnname})
endif()
list(APPEND ${exe_names} "${base}${__glnn}")
endforeach()
set(exe_names ${exe_names} PARENT_SCOPE)
endfunction()