diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-19 17:03:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-20 00:25:54 +0300 |
commit | d6aee499d0b923e9ab3ae09e801ba0688a3bf54f (patch) | |
tree | 69bd74e44eae3cec816fe3a24d25dfd8651041dc /src | |
parent | ef5519c44cf9e4e4f40d1bdc26a37832039831b3 (diff) | |
download | plus-d6aee499d0b923e9ab3ae09e801ba0688a3bf54f.tar.gz plus-d6aee499d0b923e9ab3ae09e801ba0688a3bf54f.tar.bz2 plus-d6aee499d0b923e9ab3ae09e801ba0688a3bf54f.tar.xz plus-d6aee499d0b923e9ab3ae09e801ba0688a3bf54f.zip |
Fix cmake compilation under windows.
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 23 | ||||
-rw-r--r-- | src/client.cpp | 1 |
2 files changed, 17 insertions, 7 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ca78517be..9caf67129 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,6 +9,7 @@ FIND_PACKAGE(LibXml2 REQUIRED) FIND_PACKAGE(PhysFS REQUIRED) FIND_PACKAGE(PNG REQUIRED) FIND_PACKAGE(Gettext REQUIRED) +FIND_PACKAGE(ZLIB REQUIRED) IF (POLICY CMP0015) CMAKE_POLICY(SET CMP0015 OLD) @@ -17,9 +18,9 @@ ENDIF() SET(FLAGS "-DPACKAGE_VERSION=\\\"${VERSION}\\\"") SET(FLAGS "${FLAGS} -DPKG_DATADIR=\\\"${PKG_DATADIR}/\\\"") SET(FLAGS "${FLAGS} -DLOCALEDIR=\\\"${LOCALEDIR}/\\\"") -SET(DYEFLAGS "-DPACKAGE_VERSION=\\\"${VERSION}\\\" -DDYECMD") -SET(DYEFLAGS "${DYEFLAGS} -DPKG_DATADIR=\\\"${PKG_DATADIR}/\\\"") -SET(DYEFLAGS "${DYEFLAGS} -DLOCALEDIR=\\\"${LOCALEDIR}/\\\"") +SET(DYE_FLAGS "-DPACKAGE_VERSION=\\\"${VERSION}\\\" -DDYECMD") +SET(DYE_FLAGS "${DYE_FLAGS} -DPKG_DATADIR=\\\"${PKG_DATADIR}/\\\"") +SET(DYE_FLAGS "${DYE_FLAGS} -DLOCALEDIR=\\\"${LOCALEDIR}/\\\"") IF (ENABLE_NLS) SET(FLAGS "${FLAGS} -DENABLE_NLS=1") @@ -34,7 +35,7 @@ IF (CMAKE_BUILD_TYPE) IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug OR CMAKE_BUILD_TYPE_TOLOWER MATCHES relwithdebinfo) SET(FLAGS "${FLAGS} -DDEBUG") - SET(DYEFLAGS "${DYEFLAGS} -DDEBUG") + SET(DYE_FLAGS "${DYE_FLAGS} -DDEBUG") ENDIF() ENDIF() @@ -1058,7 +1059,7 @@ SET(SRCS gui/widgets/basiccontainer2.cpp ) -SET(DYECMD_SRCS +SET(DYE_CMD_SRCS gui/cliprect.cpp gui/color.cpp gui/rect.cpp @@ -1331,6 +1332,12 @@ IF (WIN32) utils/specialfolder.h manaplus.rc ) + SET(DYE_CMD_SRCS + ${DYE_CMD_SRCS} + utils/specialfolder.cpp + utils/specialfolder.h + manaplus.rc + ) ENDIF () SET (PROGRAMS manaplus dyecmd) @@ -1341,7 +1348,7 @@ ELSE(ENABLE_EATHENA) ADD_EXECUTABLE(manaplus WIN32 ${SRCS} ${SRCS_TMWA} ${SRCS_EVOL}) ENDIF(ENABLE_EATHENA) -ADD_EXECUTABLE(dyecmd WIN32 ${DYECMD_SRCS}) +ADD_EXECUTABLE(dyecmd WIN32 ${DYE_CMD_SRCS}) TARGET_LINK_LIBRARIES(manaplus ${SDLGFX_LIBRARIES} @@ -1352,6 +1359,7 @@ TARGET_LINK_LIBRARIES(manaplus ${SDLTTF_LIBRARY} ${PNG_LIBRARIES} ${PHYSFS_LIBRARY} + ${ZLIB_LIBRARIES} ${CURL_LIBRARIES} ${LIBXML2_LIBRARIES} ${OPENGL_LIBRARIES} @@ -1368,6 +1376,7 @@ TARGET_LINK_LIBRARIES(dyecmd ${SDLTTF_LIBRARY} ${PNG_LIBRARIES} ${PHYSFS_LIBRARY} + ${ZLIB_LIBRARIES} ${CURL_LIBRARIES} ${LIBXML2_LIBRARIES} ${OPENGL_LIBRARIES} @@ -1383,4 +1392,4 @@ IF (CMAKE_SYSTEM_NAME STREQUAL SunOS) ENDIF() SET_TARGET_PROPERTIES(manaplus PROPERTIES COMPILE_FLAGS "${FLAGS}") -SET_TARGET_PROPERTIES(dyecmd PROPERTIES COMPILE_FLAGS "${DYEFLAGS}") +SET_TARGET_PROPERTIES(dyecmd PROPERTIES COMPILE_FLAGS "${DYE_FLAGS}") diff --git a/src/client.cpp b/src/client.cpp index b23cd1883..5f9dc74d8 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -143,6 +143,7 @@ #ifdef WIN32 #include <SDL_syswm.h> #include "utils/specialfolder.h" +#undef ERROR #endif #ifdef ANDROID |