[go: up one dir, main page]

Skip to content

Commit

Permalink
Merge pull request #89 from WildRackoon/master
Browse files Browse the repository at this point in the history
Added Support for Mingw-w64  #89
  • Loading branch information
Groovounet authored Aug 30, 2020
2 parents 9f9d559 + 480d87e commit ef34c7a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ if(MSVC AND CMAKE_CL_64)
set(FREEIMAGE_BINARY_DIRECTORY "win64")
endif()

if(MINGW)
set(FREEIMAGE_BINARY_DIRECTORY "win64")
MESSAGE(WARNING "x64 version of FREEIMAGE is used by default")
endif()

if(APPLE)
set(FREEIMAGE_BINARY_DIRECTORY "macosx")
endif()
Expand All @@ -80,7 +85,7 @@ set(FREEIMAGE_DIRECTORY FreeImage-3.15.4)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external/${FREEIMAGE_DIRECTORY})
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/external/${FREEIMAGE_DIRECTORY}/${FREEIMAGE_BINARY_DIRECTORY})

if(MSVC)
if(MSVC OR MINGW)
set(FREEIMAGE_LIBRARY FreeImage.lib)
set(FREEIMAGE_BINARY_FILE FreeImage.dll)
else()
Expand Down Expand Up @@ -200,7 +205,7 @@ add_subdirectory(framework)
################################
# Copy binary

if(MSVC)
if(MSVC OR MINGW)
set(COPY_BINARY copy-binary)
add_custom_target(${COPY_BINARY}
COMMAND ${CMAKE_COMMAND} -E copy ${FREEIMAGE_BIN_PATH} ${CMAKE_CURRENT_BINARY_DIR}/samples/${FREEIMAGE_BINARY_FILE}
Expand Down

0 comments on commit ef34c7a

Please sign in to comment.