more windows build work
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9524 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 692a5d4cc221908ddaed30eb3dfa80abfb7079e6 Former-commit-id: eae44d17673ae4d2cbaf4580c3ac0619255ce757
This commit is contained in:
parent
52efa58485
commit
de681128e2
2 changed files with 78 additions and 27 deletions
|
@ -636,26 +636,74 @@ MACRO(ADD_GLM_LIBRARY TARGET)
|
||||||
|
|
||||||
ENDMACRO(ADD_GLM_LIBRARY TARGET)
|
ENDMACRO(ADD_GLM_LIBRARY TARGET)
|
||||||
|
|
||||||
|
MACRO(ADD_ZLIB_INCLUDEDIR)
|
||||||
|
|
||||||
|
FIND_PACKAGE(ZLIB)
|
||||||
|
|
||||||
|
IF(ZLIB_FOUND)
|
||||||
|
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
|
||||||
|
ELSE(ZLIB_FOUND)
|
||||||
|
MESSAGE(FATAL_ERROR "Cannot find zlib header files")
|
||||||
|
ENDIF(ZLIB_FOUND)
|
||||||
|
|
||||||
|
ENDMACRO(ADD_ZLIB_INCLUDEDIR)
|
||||||
|
|
||||||
|
MACRO(ADD_ZLIB_LIBRARY TARGET)
|
||||||
|
|
||||||
|
FIND_PACKAGE(ZLIB)
|
||||||
|
|
||||||
|
IF(ZLIB_FOUND)
|
||||||
|
TARGET_LINK_LIBRARIES(${TARGET} ${ZLIB_LIBRARY})
|
||||||
|
ELSE(ZLIB_FOUND)
|
||||||
|
MESSAGE(FATAL_ERROR "Cannot find zlib libraries")
|
||||||
|
ENDIF(ZLIB_FOUND)
|
||||||
|
|
||||||
|
ENDMACRO(ADD_ZLIB_LIBRARY TARGET)
|
||||||
|
|
||||||
|
MACRO(ADD_CJSON_INCLUDEDIR)
|
||||||
|
|
||||||
|
FIND_PACKAGE(cJSON)
|
||||||
|
|
||||||
|
IF(CJSON_FOUND)
|
||||||
|
INCLUDE_DIRECTORIES(${CJSON_INCLUDE_DIR})
|
||||||
|
ELSE(CJSON_FOUND)
|
||||||
|
MESSAGE(FATAL_ERROR "Cannot find cJSON header files")
|
||||||
|
ENDIF(CJSON_FOUND)
|
||||||
|
|
||||||
|
ENDMACRO(ADD_CJSON_INCLUDEDIR TARGET)
|
||||||
|
|
||||||
MACRO(ADD_CJSON_LIBRARY TARGET)
|
MACRO(ADD_CJSON_LIBRARY TARGET)
|
||||||
|
|
||||||
FIND_PACKAGE(CJSON)
|
FIND_PACKAGE(cJSON)
|
||||||
|
|
||||||
IF(CJSON_FOUND)
|
IF(CJSON_FOUND)
|
||||||
TARGET_LINK_LIBRARIES(${TARGET} ${CJSON_LIBRARY})
|
TARGET_LINK_LIBRARIES(${TARGET} ${CJSON_LIBRARY})
|
||||||
ELSE(CJSON_FOUND)
|
ELSE(CJSON_FOUND)
|
||||||
MESSAGE(FATAL_ERROR "Cannot find cJSON libraries")
|
MESSAGE(FATAL_ERROR "Cannot find cJSON libraries")
|
||||||
ENDIF(CJSON_FOUND)
|
ENDIF(CJSON_FOUND)
|
||||||
|
|
||||||
ENDMACRO(ADD_CJSON_LIBRARY TARGET)
|
ENDMACRO(ADD_CJSON_LIBRARY TARGET)
|
||||||
|
|
||||||
|
MACRO(ADD_MINIZIP_INCLUDEDIR)
|
||||||
|
|
||||||
|
FIND_PACKAGE(minizip)
|
||||||
|
|
||||||
|
IF(MINIZIP_FOUND)
|
||||||
|
INCLUDE_DIRECTORIES(${MINIZIP_INCLUDE_DIR})
|
||||||
|
ELSE(MINIZIP_FOUND)
|
||||||
|
MESSAGE(FATAL_ERROR "Cannot find minizip header files")
|
||||||
|
ENDIF(MINIZIP_FOUND)
|
||||||
|
|
||||||
|
ENDMACRO(ADD_MINIZIP_INCLUDEDIR)
|
||||||
|
|
||||||
MACRO(ADD_MINIZIP_LIBRARY TARGET)
|
MACRO(ADD_MINIZIP_LIBRARY TARGET)
|
||||||
|
|
||||||
FIND_PACKAGE(MINIZIP)
|
FIND_PACKAGE(minizip)
|
||||||
|
|
||||||
IF(MINIZIP_FOUND)
|
IF(MINIZIP_FOUND)
|
||||||
TARGET_LINK_LIBRARIES(${TARGET} ${MINIZIP_LIBRARY})
|
TARGET_LINK_LIBRARIES(${TARGET} ${MINIZIP_LIBRARY})
|
||||||
ELSE(MINIZIP_FOUND)
|
ELSE(MINIZIP_FOUND)
|
||||||
MESSAGE(FATAL_ERROR "Cannot find minizip libraries")
|
MESSAGE(FATAL_ERROR "Cannot find minizip libraries")
|
||||||
ENDIF(MINIZIP_FOUND)
|
ENDIF(MINIZIP_FOUND)
|
||||||
|
|
||||||
ENDMACRO(ADD_MINIZIP_LIBRARY TARGET)
|
ENDMACRO(ADD_MINIZIP_LIBRARY TARGET)
|
||||||
|
|
|
@ -97,16 +97,13 @@ ENDIF(OPTION_CLIENT_SERVER)
|
||||||
ADD_SDLIB_INCLUDEDIR(math portability tgf tgfclient tgfdata ${NETWORKING_INC})
|
ADD_SDLIB_INCLUDEDIR(math portability tgf tgfclient tgfdata ${NETWORKING_INC})
|
||||||
|
|
||||||
ADD_PLIB_INCLUDEDIR()
|
ADD_PLIB_INCLUDEDIR()
|
||||||
|
|
||||||
ADD_SDL2_INCLUDEDIR()
|
ADD_SDL2_INCLUDEDIR()
|
||||||
|
|
||||||
ADD_ENET_INCLUDEDIR()
|
ADD_ENET_INCLUDEDIR()
|
||||||
|
|
||||||
ADD_CURL_INCLUDEDIR()
|
ADD_CURL_INCLUDEDIR()
|
||||||
|
ADD_CJSON_INCLUDEDIR()
|
||||||
find_package(minizip REQUIRED)
|
ADD_ZLIB_INCLUDEDIR()
|
||||||
find_package(ZLIB REQUIRED)
|
ADD_MINIZIP_INCLUDEDIR()
|
||||||
find_package(cJSON 1.0 REQUIRED)
|
#ADD_OPENSSL_INCLUDEDIR()
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
# DLL export stuff under Windows (to avoid .def file)
|
# DLL export stuff under Windows (to avoid .def file)
|
||||||
|
@ -115,7 +112,10 @@ ENDIF(WIN32)
|
||||||
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
# Ignore some run-time libs to avoid link time warnings and sometimes even crashes.
|
# Ignore some run-time libs to avoid link time warnings and sometimes even crashes.
|
||||||
SET(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:msvcrt.lib")
|
SET(CMAKE_MODULE_LINKER_FLAGS_DEBUG
|
||||||
|
"${CMAKE_MODULE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcmtd.lib")
|
||||||
|
SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE
|
||||||
|
"${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:libcmt.lib")
|
||||||
ENDIF(MSVC)
|
ENDIF(MSVC)
|
||||||
|
|
||||||
# Disable developer warning
|
# Disable developer warning
|
||||||
|
@ -131,16 +131,19 @@ SD_ADD_LIBRARY(legacymenu MODULE ${LEGACYMENU_SOURCES} ${LEGACYMENU_HEADERS})
|
||||||
|
|
||||||
find_package(OpenSSL 2.0 REQUIRED)
|
find_package(OpenSSL 2.0 REQUIRED)
|
||||||
|
|
||||||
IF(WIN32)
|
ADD_SDLIB_LIBRARY(legacymenu portability tgf tgfclient tgfdata ${NETWORKING_LIB} OpenSSL::SSL)
|
||||||
ADD_SDLIB_LIBRARY(legacymenu portability tgf tgfclient tgfdata ${NETWORKING_LIB}
|
#ADD_SDLIB_LIBRARY(legacymenu portability tgf tgfclient tgfdata ${NETWORKING_LIB})
|
||||||
cjson OpenSSL::SSL ${minizip_LIBRARIES} ZLIB::ZLIB bcrypt)
|
|
||||||
ELSE(WIN32)
|
|
||||||
ADD_SDLIB_LIBRARY(legacymenu portability tgf tgfclient tgfdata ${NETWORKING_LIB}
|
|
||||||
cjson OpenSSL::SSL ${minizip_LIBRARIES} ZLIB::ZLIB)
|
|
||||||
ENDIF(WIN32)
|
|
||||||
|
|
||||||
target_compile_features(legacymenu PRIVATE cxx_std_11)
|
target_compile_features(legacymenu PRIVATE cxx_std_11)
|
||||||
set_target_properties(legacymenu PROPERTIES CXX_STANDARD 11 CXX_EXTENSIONS OFF)
|
set_target_properties(legacymenu PROPERTIES CXX_STANDARD 11 CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
|
ADD_PLIB_LIBRARY(legacymenu)
|
||||||
|
ADD_SDL2_LIBRARY(legacymenu)
|
||||||
|
ADD_ENET_LIBRARY(legacymenu)
|
||||||
ADD_CURL_LIBRARY(legacymenu)
|
ADD_CURL_LIBRARY(legacymenu)
|
||||||
|
ADD_CJSON_LIBRARY(legacymenu)
|
||||||
|
ADD_ZLIB_LIBRARY(legacymenu)
|
||||||
|
ADD_MINIZIP_LIBRARY(legacymenu)
|
||||||
|
#ADD_OPENSSL_LIBRARY(legacymenu)
|
||||||
|
|
||||||
SD_INSTALL_FILES(LIB modules/userinterface TARGETS legacymenu)
|
SD_INSTALL_FILES(LIB modules/userinterface TARGETS legacymenu)
|
||||||
|
|
Loading…
Reference in a new issue