Skip to content

Commit

Permalink
ci: change APPLE to Darwin checks in CMake
Browse files Browse the repository at this point in the history
Apple will match all Apple operating systems, but we're really only interested in macOS
  • Loading branch information
midwan committed Sep 25, 2024
1 parent 67f2d30 commit 8cac485
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ set(SOURCE_FILES
src/cpuemu_44.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
Expand Down Expand Up @@ -443,7 +443,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)
Expand Down
4 changes: 2 additions & 2 deletions external/capsimage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8cac485

Please sign in to comment.