Combine Apple with other targets

This commit is contained in:
Joshua Groves committed 2019-03-07 07:34:27 -07:00
1 parent 0bb4daa696
commit fa2c2d7457
1 file changed
+4 -6
+4 -6
View File
@@ -10,18 +10,16 @@ if(MSVC)
target_compile_options(${TARGET_NAME} PRIVATE /W4)
add_compile_definitions(WGPU_TARGET=WGPU_TARGET_WINDOWS)
set(GLFW_LIBRARY glfw3)
elseif(APPLE)
add_compile_definitions(WGPU_TARGET=WGPU_TARGET_MACOS)
set(OS_LIBRARIES "-framework Cocoa" "-framework CoreVideo" "-framework IOKit" "-framework QuartzCore")
target_compile_options(${TARGET_NAME} PRIVATE -x objective-c)
else(MSVC)
target_compile_options(${TARGET_NAME} PRIVATE -Wall -Wextra -pedantic)
add_compile_definitions(WGPU_TARGET=WGPU_TARGET_LINUX)
set(GLFW_LIBRARY glfw)
endif(MSVC)
if(APPLE)
add_compile_definitions(WGPU_TARGET=WGPU_TARGET_MACOS)
set(OS_LIBRARIES "-framework Cocoa" "-framework CoreVideo" "-framework IOKit" "-framework QuartzCore")
target_compile_options(${TARGET_NAME} PRIVATE -x objective-c)
endif(APPLE)
find_package(glfw3)
find_library(WGPU_LIBRARY wgpu_native