Skip to content

Instantly share code, notes, and snippets.

cargo_build(NAME test-lib)
#ifndef TEST_LIB
#define TEST_LIB
#ifdef __cplusplus
extern "C" {
#endif
void print_hello();
#ifdef __cplusplus
@ekse
ekse / CMakeLists.txt
Last active April 27, 2018 04:14
CMakeLists.txt
cmake_minimum_required(VERSION 3.0)
project(CMakeRustSample)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
enable_language(Rust)
include(CMakeCargo)
include_directories("include")
#include "test_lib.h"
int main(int argc, char* argv[]) {
print_hello();
}