diff --git a/CMakeLists.txt b/CMakeLists.txt index aa36eb02c..feb8a3b35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2833,8 +2833,6 @@ foreach(_hdr IN LISTS SDL2_INCLUDE_FILES) endforeach() list(APPEND SDL_GENERATED_HEADERS ${SDL2_COPIED_INCLUDE_FILES}) -if(NOT WINDOWS OR CYGWIN OR MINGW) - set(prefix ${CMAKE_INSTALL_PREFIX}) file(RELATIVE_PATH bin_prefix_relpath "${CMAKE_INSTALL_FULL_BINDIR}" "${CMAKE_INSTALL_PREFIX}") @@ -2861,6 +2859,7 @@ Libs.private:") endif() # Clean up the different lists + if(NOT WINDOWS_STORE) listtostr(EXTRA_LIBS _EXTRA_LIBS "-l") set(SDL_STATIC_LIBS ${SDL_LIBS} ${EXTRA_LDFLAGS} ${_EXTRA_LIBS}) list(REMOVE_DUPLICATES SDL_STATIC_LIBS) @@ -2870,6 +2869,7 @@ Libs.private:") set(SDL_LIBS ${_SDL_LIBS}) listtostr(SDL_CFLAGS _SDL_CFLAGS "") set(SDL_CFLAGS ${_SDL_CFLAGS}) + endif() # MESSAGE(STATUS "SDL_LIBS: ${SDL_LIBS}") # MESSAGE(STATUS "SDL_STATIC_LIBS: ${SDL_STATIC_LIBS}") @@ -2882,7 +2882,6 @@ Libs.private:") "${SDL2_BINARY_DIR}/sdl2-config" @ONLY) configure_file("${SDL2_SOURCE_DIR}/SDL2.spec.in" "${SDL2_BINARY_DIR}/SDL2.spec" @ONLY) -endif() macro(check_add_debug_flag FLAG SUFFIX) check_c_compiler_flag(${FLAG} HAS_C_FLAG_${SUFFIX}) @@ -3310,6 +3309,7 @@ if(NOT SDL2_DISABLE_INSTALL) install(FILES "${SDL2_SOURCE_DIR}/sdl2.m4" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/aclocal") install(FILES "LICENSE.txt" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/licenses/${PROJECT_NAME}") endif() + install(FILES ${SDL2_BINARY_DIR}/sdl2.pc DESTINATION "lib${LIB_SUFFIX}/pkgconfig") endif() ##### Uninstall target #####