implement BINARY_SUFFIX and BINARY_PREFIX...

...(equivalent to --program-suffix= and --program-prefix=) in the
cmake recipe
This commit is contained in:
Nils Kneuper 2008-05-07 09:58:52 +00:00
parent 22c1a4aab2
commit dfa8407141
2 changed files with 22 additions and 20 deletions

View file

@ -67,6 +67,8 @@ set(DATAROOTDIR "share" CACHE STRING "Sets the root of data directories to a non
set(DATADIR "${DATAROOTDIR}/wesnoth" CACHE STRING "Read-only architecture-independent game data")
set(LOCALEDIR "translations" CACHE STRING "sets the locale data directory to a non-default location")
set(PREFERENCES_DIR "" CACHE STRING "Use a non-default preferences directory (.wesnoth on unix)")
set(BINARY_SUFFIX "" CACHE STRING "Suffix behind all binaries")
set(BINARY_PREFIX "" CACHE STRING "Prefix in front of all binaries")
set(GUI "normal" CACHE STRING "Set for GUI reductions for resolutions down to 800x480 (eeePC, Nokia 8x0) or 320x240 (PDAs) (normal|small|tiny)")

View file

@ -209,10 +209,10 @@ SET(wesnoth_SRC
${wesnoth-main_SRC}
)
ADD_EXECUTABLE(wesnoth ${wesnoth_SRC})
TARGET_LINK_LIBRARIES(wesnoth wesnoth-core wesnoth-game ${the-external-libs})
ADD_EXECUTABLE(${BINARY_PREFIX}wesnoth${BINARY_SUFFIX} ${wesnoth_SRC})
TARGET_LINK_LIBRARIES(${BINARY_PREFIX}wesnoth${BINARY_SUFFIX} wesnoth-core wesnoth-game ${the-external-libs})
INSTALL(TARGETS wesnoth DESTINATION ${BINDIR})
INSTALL(TARGETS ${BINARY_PREFIX}wesnoth${BINARY_SUFFIX} DESTINATION ${BINDIR})
ENDIF(ENABLE_GAME)
@ -234,10 +234,10 @@ SET(wesnoth_editor_SRC
tooltips.cpp
)
ADD_EXECUTABLE(wesnoth_editor ${wesnoth_editor_SRC})
TARGET_LINK_LIBRARIES(wesnoth_editor wesnoth-core wesnoth-game ${the-external-libs})
ADD_EXECUTABLE(${BINARY_PREFIX}wesnoth_editor${BINARY_SUFFIX} ${wesnoth_editor_SRC})
TARGET_LINK_LIBRARIES(${BINARY_PREFIX}wesnoth_editor${BINARY_SUFFIX} wesnoth-core wesnoth-game ${the-external-libs})
INSTALL(TARGETS wesnoth_editor DESTINATION ${BINDIR})
INSTALL(TARGETS ${BINARY_PREFIX}wesnoth_editor${BINARY_SUFFIX} DESTINATION ${BINDIR})
ENDIF(ENABLE_EDITOR)
@ -258,10 +258,10 @@ SET(wesnothd_SRC
loadscreen_empty.cpp
)
ADD_EXECUTABLE(wesnothd ${wesnothd_SRC})
TARGET_LINK_LIBRARIES(wesnothd wesnoth-core ${the-external-libs})
ADD_EXECUTABLE(${BINARY_PREFIX}wesnothd${BINARY_SUFFIX} ${wesnothd_SRC})
TARGET_LINK_LIBRARIES(${BINARY_PREFIX}wesnothd${BINARY_SUFFIX} wesnoth-core ${the-external-libs})
INSTALL(TARGETS wesnothd DESTINATION ${BINDIR})
INSTALL(TARGETS ${BINARY_PREFIX}wesnothd${BINARY_SUFFIX} DESTINATION ${BINDIR})
ENDIF(ENABLE_SERVER)
@ -277,10 +277,10 @@ SET(campaignd_SRC
loadscreen_empty.cpp
)
ADD_EXECUTABLE(campaignd ${campaignd_SRC})
TARGET_LINK_LIBRARIES(campaignd wesnoth-core ${the-external-libs})
ADD_EXECUTABLE(${BINARY_PREFIX}campaignd${BINARY_SUFFIX} ${campaignd_SRC})
TARGET_LINK_LIBRARIES(${BINARY_PREFIX}campaignd${BINARY_SUFFIX} wesnoth-core ${the-external-libs})
INSTALL(TARGETS campaignd DESTINATION ${BINDIR})
INSTALL(TARGETS ${BINARY_PREFIX}campaignd${BINARY_SUFFIX} DESTINATION ${BINDIR})
ENDIF(ENABLE_CAMPAIGN_SERVER)
@ -298,10 +298,10 @@ SET(exploder_SRC
loadscreen_empty.cpp
)
ADD_EXECUTABLE(exploder ${exploder_SRC})
TARGET_LINK_LIBRARIES(exploder wesnoth-core ${the-external-libs} png12)
ADD_EXECUTABLE(${BINARY_PREFIX}exploder${BINARY_SUFFIX} ${exploder_SRC})
TARGET_LINK_LIBRARIES(${BINARY_PREFIX}exploder${BINARY_SUFFIX} wesnoth-core ${the-external-libs} png12)
INSTALL(TARGETS exploder DESTINATION ${BINDIR})
INSTALL(TARGETS ${BINARY_PREFIX}exploder${BINARY_SUFFIX} DESTINATION ${BINDIR})
SET(cutter_SRC
tools/cutter.cpp
@ -312,10 +312,10 @@ SET(cutter_SRC
loadscreen_empty.cpp
)
ADD_EXECUTABLE(cutter ${cutter_SRC})
TARGET_LINK_LIBRARIES(cutter wesnoth-core ${the-external-libs} png12)
ADD_EXECUTABLE(${BINARY_PREFIX}cutter${BINARY_SUFFIX} ${cutter_SRC})
TARGET_LINK_LIBRARIES(${BINARY_PREFIX}cutter${BINARY_SUFFIX} wesnoth-core ${the-external-libs} png12)
INSTALL(TARGETS cutter DESTINATION ${BINDIR})
INSTALL(TARGETS ${BINARY_PREFIX}cutter${BINARY_SUFFIX} DESTINATION ${BINDIR})
ENDIF(ENABLE_TOOLS)
@ -331,8 +331,8 @@ SET(test_SRC
${wesnoth-main_SRC}
)
ADD_EXECUTABLE(test ${test_SRC})
TARGET_LINK_LIBRARIES(test wesnoth-core wesnoth-game ${the-external-libs} boost_unit_test_framework)
ADD_EXECUTABLE(${BINARY_PREFIX}test${BINARY_SUFFIX} ${test_SRC})
TARGET_LINK_LIBRARIES(${BINARY_PREFIX}test${BINARY_SUFFIX} wesnoth-core wesnoth-game ${the-external-libs} boost_unit_test_framework)
ENDIF(ENABLE_TESTS)