Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ if(APPLE)
find_path(IOKit_INCLUDE_DIR NAMES IOKitLib.h HINTS ${IOKit_INC_SEARCH_PATH} ${IOKit_PKGC_INCLUDE_DIRS} PATH_SUFFIXES IOKit)
list(APPEND JSSC_ADDITIONAL_INCLUDES ${IOKit_INCLUDE_DIR})
endif()

# Handle edge-case with legacy versioned SDK headers (e.g. usr/include/c++/4.2.1)
if(CMAKE_OSX_SYSROOT)
file(GLOB std_versions "${CMAKE_OSX_SYSROOT}/usr/include/c++/*")
foreach(std_version IN LISTS std_versions)
if("${std_version}" MATCHES "/v[0-9]*$")
# Ignore c++/v1 (should already be included)
continue()
elseif(IS_DIRECTORY "${std_version}")
message(STATUS "Adding legacy include path: ${std_version}")
list(APPEND JSSC_ADDITIONAL_INCLUDES "${std_version}")
endif()
endforeach()
endif()
endif()

set(CMAKE_CXX_STANDARD 11)
Expand Down