Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed CMake file on 64bit MSYS2 #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Makefile.in
INSTALL
aclocal.m4
ar-lib
build
compile
config.*
configure
Expand Down
16 changes: 6 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ find_package(OpenSSL REQUIRED)
IF(WIN32)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config_windows.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/include/config.h)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/contrib/win32)
find_library(WINSOCK_LIB libws2_32.a)
set(LIBS ${LIBS} ${WINSOCK_LIB})
IF(NOT MINGW)
find_library(WINSOCK_LIB libws2_32.a)
set(LIBS ${LIBS} ${WINSOCK_LIB})
ELSE(NOT MINGW)
set(LIBS ${LIBS} libws2_32.a)
ENDIF(NOT MINGW)
ELSE(WIN32)
include(CheckIncludeFiles)
check_include_files("sys/endian.h" HAVE_SYS_ENDIAN_H)
Expand All @@ -36,14 +40,6 @@ ENDIF(WIN32)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
add_definitions("-DHAVE_CONFIG_H")

if(MINGW AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
# force MinGW-w64 in 32bit mode
add_definitions("-m32")
add_definitions("-DNOCRYPT")
set(CMAKE_SHARED_LINKER_FLAGS -m32)
set(CMAKE_EXE_LINKER_FLAGS -m32)
endif(MINGW)

message("CMAKE_C_FLAGS: " ${CMAKE_C_FLAGS})
message("CMAKE_SHARED_LINKER_FLAGS: " ${CMAKE_SHARED_LINKER_FLAGS})

Expand Down