Vendor CMakeRust
This commit is contained in:
committed by
Dustin J. Mitchell
parent
37d7f3de8a
commit
7492fc48bb
9
cmake/CMakeRust/hello_world/CMakeLists.txt
Normal file
9
cmake/CMakeRust/hello_world/CMakeLists.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
add_executable(helloworld hello.c)
|
||||
if(WIN32)
|
||||
target_link_libraries(helloworld test-lib ws2_32 userenv)
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
target_link_libraries(helloworld test-lib resolv)
|
||||
else()
|
||||
target_link_libraries(helloworld test-lib pthread dl m)
|
||||
endif()
|
||||
6
cmake/CMakeRust/hello_world/hello.c
Normal file
6
cmake/CMakeRust/hello_world/hello.c
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
#include "test_lib.h"
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
hello();
|
||||
}
|
||||
6
cmake/CMakeRust/hello_world/test_lib.h
Normal file
6
cmake/CMakeRust/hello_world/test_lib.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef TEST_LIB
|
||||
#define TEST_LIB
|
||||
|
||||
void hello();
|
||||
|
||||
#endif /* TEST_LIB */
|
||||
Reference in New Issue
Block a user