Skip to content

Commit

Permalink
Merge branch 'release/0.0.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ruimaciel committed Apr 5, 2020
2 parents 4966ba2 + a0cbbbd commit c62ae69
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
28 changes: 21 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
cmake_minimum_required(VERSION 3.1)

project(mropes
VERSION 0.0.3.0
VERSION 0.0.4.0
LANGUAGES C
)

set(mropes_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/rope.c
${CMAKE_CURRENT_SOURCE_DIR}/src/rope_ops.c
${CMAKE_CURRENT_SOURCE_DIR}/src/rope_stack.c
src/rope.c
src/rope_ops.c
src/rope_stack.c
)

set(mropes_INCLUDES
${CMAKE_CURRENT_SOURCE_DIR}/include/mropes/rope.h
include/mropes/rope.h
)

set(mropes_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/src/rope_ops.h
${CMAKE_CURRENT_SOURCE_DIR}/src/rope_stack.h
src/rope_ops.h
src/rope_stack.h
)

configure_file(src/version.h.in include/mropes/version.h)

add_library(${PROJECT_NAME} SHARED
${mropes_SOURCES}
${mropes_INCLUDES}
Expand All @@ -39,13 +41,25 @@ set_target_properties(
C_STANDARD 90
C_STANDARD_REQUIRED ON
C_EXTENSIONS OFF
PUBLIC_HEADER ${mropes_INCLUDES}
)

install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}
LIBRARY DESTINATION lib/${PROJECT_NAME}
PUBLIC_HEADER DESTINATION include/${PROJECT_NAME}
)

install(FILES
${CMAKE_CURRENT_BINARY_DIR}/include/mropes/version.h
DESTINATION include/${PROJECT_NAME}
)

install(
EXPORT ${PROJECT_NAME}
DESTINATION lib/cmake/${PROJECT_NAME}
)

option(ENABLE_TESTS "Enable tests" ON)
if (${ENABLE_TESTS})
enable_testing()
Expand Down
10 changes: 10 additions & 0 deletions src/version.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef MROPES_VERSION_H
#define MROPES_VERSION_H

#define MROPES_VERSION "@PROJECT_VERSION@"
#define MROPES_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define MROPES_VERSION_MINOR @PROJECT_VERSION_MINOR@
#define MROPES_VERSION_PATCH @PROJECT_VERSION_PATCH@
#define MROPES_VERSION_TWEAK @PROJECT_VERSION_TWEAK@

#endif MROPES_VERSION_H

0 comments on commit c62ae69

Please sign in to comment.