Initial conversion to CMake

This commit is contained in:
Nils O. Selåsdal
2016-10-02 21:39:02 +02:00
parent 260d2c67c2
commit 55846a0e42
5 changed files with 69 additions and 4 deletions
+14
View File
@@ -0,0 +1,14 @@
configure_file (
"version.c.in"
"version.c"
)
file(GLOB SOURCE_FILES *.c)
add_library(
ucore SHARED
${SOURCE_FILES}
"${PROJECT_BINARY_DIR}/src/version.c"
)
set_target_properties(ucore PROPERTIES SOVERSION 1 VERSION 1.0.0)
target_link_libraries(ucore pthread)
install (TARGETS ucore DESTINATION lib)
+4 -4
View File
@@ -1,11 +1,11 @@
//Various info about the version and build.
//The SConscript file substitutes these at build time
const int ucore_version_major = @version_major@;
const int ucore_version_minor = @version_minor@;
const int ucore_version_patch = @version_patch@;
const int ucore_version_major = @libucore_VERSION_MAJOR@;
const int ucore_version_minor = @libucore_VERSION_MINOR@;
const int ucore_version_patch = @libucore_VERSION_PATCH@;
const char ucore_version_str[] = "@version_str@";
const char ucore_version_str[] = "@libucore_VERSION@";
const char ucore_build_host[] = "@build_host@";
const char ucore_build_type[] = "@build_type@";