[CMake] Renaming output of EXECUTABLE
Darko Miletic
darko at uvcms.com
Thu Dec 1 10:55:55 EST 2005
Reggie Burnett wrote:
> Thanks Darko. I'm very new to cmake so even some of the simple things
> currently escape me. Can I also use a variable for the target?
>
> ADD_EXECUTABLE(${EXENAME} ${SRCS})
Of course. You can even modify the filename based on some conditions:
IF (CMAKE_BUILD_TYPE MATCHES Debug)
SET(DBG "_dbg")
ELSE (CMAKE_BUILD_TYPE MATCHES Debug)
SET(DBG "")
ENDIF (CMAKE_BUILD_TYPE MATCHES Debug)
SET (EXENAME baseexename${DBG})
ADD_EXECUTABLE(${EXENAME} ${SRCS})
More information about the CMake
mailing list