Mercurial > pub > dyncall > dyncall
view test/dynload_plain/CMakeLists.txt @ 472:e5820b7a3fbc
doc:
- some more plan 9 disas examples
- x86 callconv doc updated:
* mainly info about aggregate passing and returning
* removing section about pascal calling convention, as dyncall doesn't support 16bit abis
- some cleanups
author | Tassilo Philipp |
---|---|
date | Thu, 10 Feb 2022 17:32:05 +0100 |
parents | 73b5b9e224e2 |
children |
line wrap: on
line source
add_executable(dynload_plain dynload_plain.c) target_link_libraries(dynload_plain dynload_s ${CMAKE_DL_LIBS}) file(WRITE x.c "int dynload_plain_testfunc() { return 5; }") add_library(x SHARED x.c) set_target_properties(x PROPERTIES OUTPUT_NAME "dynload_plain_ß_test") set_target_properties(x PROPERTIES PREFIX "") set_target_properties(x PROPERTIES SUFFIX "") if(${UNIX}) exec_program("((ldd `which ls` | grep -o '/.*/libc.so[^ ]*' || ls /lib*/libc.so* || ls /usr/lib/libc.so*) | grep -v '\\.a\$' | (sort -V -r || sort -t . -n -k 2)) 2>/dev/null | head -1" OUTPUT_VARIABLE DEF_C_DYLIB) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDEF_C_DYLIB=\\\"${DEF_C_DYLIB}\\\"") endif()