Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Merge pull request #4 from Predelnik/hunter-v2.0.7
Browse files Browse the repository at this point in the history
Fixing build for MSVC.
  • Loading branch information
ruslo authored Dec 23, 2017
2 parents 0c9d692 + a153823 commit aa1b3ee
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ include(CheckStructHasMember)
include(CMakeDependentOption)
include(FindPkgConfig)
include(GNUInstallDirs)
set(CMAKE_MODULE_PATH "${SDL2_SOURCE_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH "${SDL2_SOURCE_DIR}/cmake")

include(${SDL2_SOURCE_DIR}/cmake/macros.cmake)
include(${SDL2_SOURCE_DIR}/cmake/sdlchecks.cmake)
Expand Down Expand Up @@ -1564,13 +1564,7 @@ endif()
# endif()


check_c_source_compiles("
#ifndef __ANDROID_
#error asdf
#endif
" IS_ANDROID)

if (NOT (IS_ANDROID OR APPLE))
if (NOT (ANDROID OR APPLE))
add_definitions(-DUSING_GENERATED_CONFIG_H)
configure_file("${SDL2_SOURCE_DIR}/include/SDL_config.h.cmake"
"${SDL2_BINARY_DIR}/include/SDL_config.h")
Expand Down Expand Up @@ -1695,13 +1689,7 @@ install(TARGETS ${_INSTALL_LIBS}
RUNTIME DESTINATION bin)

##### Export files #####
if (APPLE)
set(PKG_PREFIX "SDL2.framework/Resources")
elseif (WINDOWS)
set(PKG_PREFIX "cmake")
else ()
set(PKG_PREFIX "lib/cmake/SDL2")
endif ()

include(CMakePackageConfigHelpers)
write_basic_package_version_file("${CMAKE_BINARY_DIR}/SDL2ConfigVersion.cmake"
Expand All @@ -1711,7 +1699,6 @@ write_basic_package_version_file("${CMAKE_BINARY_DIR}/SDL2ConfigVersion.cmake"

install(
FILES
${CMAKE_CURRENT_SOURCE_DIR}/SDL2Config.cmake
${CMAKE_BINARY_DIR}/SDL2ConfigVersion.cmake
DESTINATION ${PKG_PREFIX}
COMPONENT Devel
Expand Down

0 comments on commit aa1b3ee

Please sign in to comment.