ci: change APPLE to Darwin checks in CMake

Apple will match all Apple operating systems, but we're really only interested in macOS
This commit is contained in:
Dimitris Panokostas 2024-09-25 07:57:01 +02:00
parent 8aa92e5c24
commit 045acf2f9b
No known key found for this signature in database
GPG Key ID: 330156A68E9E0929
2 changed files with 4 additions and 4 deletions

View File

@ -408,7 +408,7 @@ set(SOURCE_FILES
src/jit/compemu_support.cpp
)
if (APPLE)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${SOURCE_FILES})
set_target_properties(${PROJECT_NAME} PROPERTIES
MACOSX_BUNDLE TRUE
@ -525,7 +525,7 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
DEPENDS external/capsimage)
# Install the executable
if (APPLE)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
install(TARGETS ${PROJECT_NAME} BUNDLE DESTINATION .)
else ()
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)

View File

@ -9,7 +9,7 @@ set(MINOR_VERSION 1)
option(BUILD_SHARED_LIBS "Build a dynamic library instead of static library" ON)
if (APPLE)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
option(BUILD_FRAMEWORK "Build a macOS framework instead of a shared library" OFF)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
set(BUILD_SHARED_LIBS ON)
@ -44,7 +44,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE
src/Codec
src/Device)
if (APPLE AND BUILD_FRAMEWORK)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND BUILD_FRAMEWORK)
set_target_properties(${PROJECT_NAME} PROPERTIES
OUTPUT_NAME ${PROJECT_TITLE}
FRAMEWORK TRUE