mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-11 16:29:00 +08:00
408990caef
* [minifb] Add new port * Fix arm build error * Add fix-arm-build-error.patch file * Update fix-arm-build-error.patch file
55 lines
1.7 KiB
Diff
55 lines
1.7 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 06ba472..6dc7988 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -17,6 +17,12 @@ file(GLOB SrcMacOSX "src/macosx/*.c"
|
|
file(GLOB SrcWayland "src/wayland/*.c")
|
|
file(GLOB SrcX11 "src/x11/*.c")
|
|
|
|
+file(GLOB HEADERS "include/*.h")
|
|
+file(GLOB HeaderWindows "src/windows/*.h")
|
|
+file(GLOB HeaderMacOSX "src/macosx/*.h")
|
|
+file(GLOB HeaderWayland "src/wayland/*.h")
|
|
+file(GLOB HeaderX11 "src/x11/*.h")
|
|
+
|
|
if (NOT MSVC)
|
|
set (CMAKE_C_FLAGS "-g -Wall -Wextra -pedantic -Wno-switch -Wno-unused-function")
|
|
set (CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11")
|
|
@@ -34,19 +40,24 @@ if (MSVC)
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
|
add_definitions(-D_WIN32_WINNT=0x0600)
|
|
list (APPEND SrcLib ${SrcWindows})
|
|
+ list (APPEND HEADERS ${HeaderWindows})
|
|
elseif (MINGW)
|
|
add_definitions(-D_WIN32_WINNT=0x0600)
|
|
list(APPEND SrcLib ${SrcWindows})
|
|
+ list (APPEND HEADERS ${HeaderWindows})
|
|
elseif (APPLE)
|
|
if(USE_METAL_API)
|
|
add_definitions(-DUSE_METAL_API)
|
|
endif()
|
|
list(APPEND SrcLib ${SrcMacOSX})
|
|
+ list (APPEND HEADERS ${HeaderMacOSX})
|
|
elseif (UNIX)
|
|
if(USE_WAYLAND_API)
|
|
list(APPEND SrcLib ${SrcWayland})
|
|
+ list (APPEND HEADERS ${HeaderWayland})
|
|
else()
|
|
list(APPEND SrcLib ${SrcX11})
|
|
+ list (APPEND HEADERS ${HeaderX11})
|
|
endif()
|
|
endif()
|
|
|
|
@@ -112,3 +123,11 @@ elseif (UNIX)
|
|
target_link_libraries(multiple_windows -lX11)
|
|
endif()
|
|
endif()
|
|
+
|
|
+install(TARGETS minifb
|
|
+ RUNTIME DESTINATION bin
|
|
+ LIBRARY DESTINATION lib
|
|
+ ARCHIVE DESTINATION lib
|
|
+ )
|
|
+
|
|
+install(FILES ${HEADERS} DESTINATION include)
|