mirror of
https://github.com/carp-lang/Carp.git
synced 2024-11-12 12:49:13 +03:00
Merge pull request #3 from bagucode/master
CMake now uses configurable paths for libffi
This commit is contained in:
commit
a047930a42
@ -7,15 +7,23 @@ set(VERSION_MINOR "0")
|
||||
set(VERSION_PATCH "1")
|
||||
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
||||
|
||||
set(LIBFFI_INCLUDE_PATH
|
||||
"${PROJECT_SOURCE_DIR}/../libffi/x86_64-apple-darwin15.3.0/include"
|
||||
CACHE
|
||||
PATH
|
||||
"libffi include directory")
|
||||
|
||||
set(LIBFFI_LIBRARY
|
||||
"${PROJECT_SOURCE_DIR}/../libffi/x86_64-apple-darwin15.3.0/.libs/libffi.a"
|
||||
CACHE
|
||||
FILEPATH
|
||||
"libffi library")
|
||||
|
||||
set(SOURCE_DIR src)
|
||||
include(globfiles.cmake)
|
||||
|
||||
# list(APPEND SOURCE_FILES src/main.c src/obj.c src/gc.c src/obj_string.c src/reader.c src/eval.c src/env.c src/primops.c src/repl.c)
|
||||
|
||||
# ${SOURCE_FILES}
|
||||
|
||||
include_directories(/usr/local/opt/libffi/lib/libffi-3.0.13/include)
|
||||
link_directories(/usr/local/opt/libffi/lib/)
|
||||
include_directories(${LIBFFI_INCLUDE_PATH})
|
||||
link_directories(${LIBFFI_LIBRARY})
|
||||
|
||||
add_executable(${PROJECT_NAME} ${${PROJECT_NAME}_h} ${${PROJECT_NAME}_c})
|
||||
|
||||
@ -23,6 +31,5 @@ target_link_libraries(${PROJECT_NAME} ffi)
|
||||
|
||||
set_target_properties(${PROJECT_NAME}
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin"
|
||||
)
|
||||
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user