diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c256caa..11feca6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -461,25 +461,27 @@ list (APPEND USCXML_CORE_LIBS ${EVENT_LIBRARY}) ################################################# # Optional libraries -if (OFF AND (APPLE OR IOS)) +if (APPLE OR IOS) find_library(AUDIOTOOLBOX AudioToolbox REQUIRED) - list (APPEND USCXML_OPT_LIBS ${AUDIOTOOLBOX}) - + list (APPEND USCXML_OPT_LIBS ${AUDIOTOOLBOX}/AudioToolbox) + set(AUDIOTOOLBOX_FOUND ON) + find_library(FOUNDATION_LIBRARY Foundation) list (APPEND USCXML_OPT_LIBS ${FOUNDATION_LIBRARY}/Foundation) - - find_library(JSC_LIBRARY JavaScriptCore) + if (IOS) find_library(WTF_LIBRARY WTF) find_library(ICU_LIBRARY icucore REQUIRED) - list (APPEND USCXML_OPT_LIBS ${JSC_LIBRARY}) list (APPEND USCXML_OPT_LIBS ${WTF_LIBRARY}) list (APPEND USCXML_OPT_LIBS ${ICU_LIBRARY}) - else() - list (APPEND USCXML_OPT_LIBS ${JSC_LIBRARY}) endif() + +endif() + +if (APPLE OR IOS) + find_library(JSC_LIBRARY JavaScriptCore) + list (APPEND USCXML_OPT_LIBS ${JSC_LIBRARY}) set(JSC_FOUND ON) - set(AUDIOTOOLBOX_FOUND ON) else() find_package(V8) if (V8_FOUND) @@ -559,7 +561,11 @@ set(CMAKE_FIND_FRAMEWORK "FIRST") find_package(OpenAL) if (OPENAL_FOUND) list (APPEND USCXML_INCLUDE_DIRS ${OPENAL_INCLUDE_DIR}) - list (APPEND USCXML_OPT_LIBS ${OPENAL_LIBRARY}) + if (APPLE OR IOS) + list (APPEND USCXML_OPT_LIBS ${OPENAL_LIBRARY}/OpenAL) + else() + list (APPEND USCXML_OPT_LIBS ${OPENAL_LIBRARY}) + endif() else() find_package(OpenALKCAT) if (OPENAL_FOUND) @@ -626,7 +632,11 @@ foreach( FILE ${USCXML_FILES} ) if (${PATH} MATCHES ".*datamodel\\/ecmascript.*") STRING(REGEX MATCH "[^\\/]*$" COMP_NAME ${PATH}) - source_group("Datamodel\\EcmaScript\\${COMP_NAME}" FILES ${FILE}) + if (COMP_NAME STREQUAL "ecmascript") + source_group("Datamodel\\EcmaScript" FILES ${FILE}) + else() + source_group("Datamodel\\EcmaScript\\${COMP_NAME}" FILES ${FILE}) + endif() elseif (${PATH} MATCHES ".*datamodel\\/prolog.*") STRING(REGEX MATCH "[^\\/]*$" COMP_NAME ${PATH}) source_group("Datamodel\\Prolog\\${COMP_NAME}" FILES ${FILE}) |