diff options
author | Bernd Wachter <bwachter-tmw@lart.info> | 2010-01-23 21:56:45 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-01-31 17:45:38 +0100 |
commit | cf85e1fc67900ac79ac18413a19878ae5e608b4d (patch) | |
tree | 44a2f8be20076d52dab9e6554889e84d5ca3c3fe /src/CMakeLists.txt | |
parent | a39e10b8323d3f26e3eaddb83568f1854170210d (diff) | |
download | mana-cf85e1fc67900ac79ac18413a19878ae5e608b4d.tar.gz mana-cf85e1fc67900ac79ac18413a19878ae5e608b4d.tar.bz2 mana-cf85e1fc67900ac79ac18413a19878ae5e608b4d.tar.xz mana-cf85e1fc67900ac79ac18413a19878ae5e608b4d.zip |
Add win32 rc handling to cmake; fix icon path
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cc0a0c3b..6b401967 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -69,6 +69,22 @@ INCLUDE_DIRECTORIES( ${GUICHAN_INCLUDE_DIR} ) +# enable rc-handling with mingw +# most likely this part can be kicked out with some later cmake version +IF (MINGW) + FIND_PATH(MINGW_INCLUDE_DIR windows.h $ENV{INCLUDE}) + IF (MINGW_INCLUDE_DIR) + MESSAGE(STATUS "Found mingw headers: ${MINGW_INCLUDE_DIR}") + INCLUDE_DIRECTORIES(${MINGW_INCLUDE_DIR}) + ELSE() + MESSAGE(FATAL_ERROR "Unable to find mingw headers. Required for windres") + ENDIF() + SET(CMAKE_RC_COMPILER_INIT windres) + ENABLE_LANGUAGE(RC) + SET(CMAKE_RC_COMPILE_OBJECT + "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -O coff -o <OBJECT> <SOURCE>") +ENDIF() + # Fix some stuff that gets not hidden by mainline modules MARK_AS_ADVANCED(PHYSFS_INCLUDE_DIR) MARK_AS_ADVANCED(PHYSFS_LIBRARY) @@ -568,6 +584,10 @@ SET(SRCS_MANA net/manaserv/tradehandler.h ) +IF (WIN32) + SET(SRCS_MANA ${SRCS_MANA} mana.rc) + SET(SRCS_EA ${SRCS_EA} mana-ea.rc) +ENDIF () SET (PROGRAMS mana mana-ea) |