forked from dpiparo/vdt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeDefaults.txt
32 lines (24 loc) · 994 Bytes
/
CMakeDefaults.txt
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
# Useful Macros to be used later
macro(change_option NAME NEWVAL)
unset(${NAME} CACHE)
set(${NAME} ${NEWVAL} CACHE BOOL "Value changed by cmake - probably due to compiler incompatibilities")
endmacro(change_option)
macro(add_exe_and_link EXENAME FILENAME ADDITIONAL_LIB)
# no name is lib not present
set (ADDITIONAL_LIB_NAME "")
if (NOT APPLE) # in this case u have the framework carbon
if (${ADDITIONAL_LIB} MATCHES "None")
else (${ADDITIONAL_LIB} MATCHES "None")
set (ADDITIONAL_LIB_NAME ${ADDITIONAL_LIB})
endif (${ADDITIONAL_LIB} MATCHES "None")
endif (NOT APPLE)
#link Vc if present
if(USE_VC)
add_executable( ${EXENAME} ${FILENAME})
target_link_libraries(${EXENAME} vdt VcWrapper ${ADDITIONAL_LIB_NAME})
else(USE_VC)
add_executable( ${EXENAME} ${FILENAME})
target_link_libraries(${EXENAME} vdt ${ADDITIONAL_LIB_NAME})
endif(USE_VC)
endmacro(add_exe_and_link)
# End macro definitions