Always use the project version
Don't duplicated versions so we avoid the problem of missing one instance to be updated.
This commit is contained in:
parent
e2119f77d6
commit
48df02f102
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2021-2023 Barcelona Supercomputing Center (BSC)
|
# Copyright (c) 2021-2023 Barcelona Supercomputing Center (BSC)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
configure_file("ovni.h.in" "${CMAKE_CURRENT_BINARY_DIR}/ovni.h")
|
||||||
|
@ -34,7 +34,7 @@ typedef struct json_value_t JSON_Value;
|
|||||||
#define OVNI_STREAM_EXT ".obs"
|
#define OVNI_STREAM_EXT ".obs"
|
||||||
|
|
||||||
/* Follow https://semver.org rules for versioning */
|
/* Follow https://semver.org rules for versioning */
|
||||||
#define OVNI_LIB_VERSION "1.2.0"
|
#define OVNI_LIB_VERSION "@PROJECT_VERSION@"
|
||||||
|
|
||||||
/* ----------------------- common ------------------------ */
|
/* ----------------------- common ------------------------ */
|
||||||
|
|
@ -56,6 +56,7 @@ add_library(emu STATIC
|
|||||||
kernel/setup.c
|
kernel/setup.c
|
||||||
kernel/event.c
|
kernel/event.c
|
||||||
)
|
)
|
||||||
|
target_link_libraries(emu ovni-static)
|
||||||
|
|
||||||
add_executable(ovniemu ovniemu.c)
|
add_executable(ovniemu ovniemu.c)
|
||||||
target_link_libraries(ovniemu emu parson-static ovni-static)
|
target_link_libraries(ovniemu emu parson-static ovni-static)
|
||||||
@ -78,7 +79,7 @@ if(USE_MPI)
|
|||||||
endif()
|
endif()
|
||||||
find_package(MPI REQUIRED)
|
find_package(MPI REQUIRED)
|
||||||
add_executable(ovnisync ovnisync.c)
|
add_executable(ovnisync ovnisync.c)
|
||||||
target_link_libraries(ovnisync m MPI::MPI_C)
|
target_link_libraries(ovnisync ovni-static m MPI::MPI_C)
|
||||||
install(TARGETS ovnisync)
|
install(TARGETS ovnisync)
|
||||||
else()
|
else()
|
||||||
message(STATUS "Disabling ovnisync as MPI is disabled")
|
message(STATUS "Disabling ovnisync as MPI is disabled")
|
||||||
|
@ -5,14 +5,14 @@ include_directories("${CMAKE_SOURCE_DIR}/src/include")
|
|||||||
|
|
||||||
add_library(ovni SHARED ovni.c)
|
add_library(ovni SHARED ovni.c)
|
||||||
target_link_libraries(ovni parson common)
|
target_link_libraries(ovni parson common)
|
||||||
target_include_directories(ovni PUBLIC "${CMAKE_SOURCE_DIR}/include")
|
target_include_directories(ovni PUBLIC "${CMAKE_BINARY_DIR}/include")
|
||||||
set_target_properties(ovni PROPERTIES
|
set_target_properties(ovni PROPERTIES
|
||||||
VERSION 1.2.0
|
VERSION ${PROJECT_VERSION}
|
||||||
SOVERSION 1
|
SOVERSION ${PROJECT_VERSION_MAJOR}
|
||||||
PUBLIC_HEADER "${CMAKE_SOURCE_DIR}/include/ovni.h")
|
PUBLIC_HEADER "${CMAKE_BINARY_DIR}/include/ovni.h")
|
||||||
|
|
||||||
add_library(ovni-static STATIC ovni.c)
|
add_library(ovni-static STATIC ovni.c)
|
||||||
target_link_libraries(ovni-static parson-static common-static)
|
target_link_libraries(ovni-static parson-static common-static)
|
||||||
target_include_directories(ovni-static PUBLIC "${CMAKE_SOURCE_DIR}/include")
|
target_include_directories(ovni-static PUBLIC "${CMAKE_BINARY_DIR}/include")
|
||||||
|
|
||||||
install(TARGETS ovni)
|
install(TARGETS ovni)
|
||||||
|
@ -8,4 +8,4 @@ target_include_directories(instr-static
|
|||||||
PRIVATE "${CMAKE_SOURCE_DIR}/src/include"
|
PRIVATE "${CMAKE_SOURCE_DIR}/src/include"
|
||||||
PRIVATE "${CMAKE_SOURCE_DIR}/include"
|
PRIVATE "${CMAKE_SOURCE_DIR}/include"
|
||||||
)
|
)
|
||||||
target_link_libraries(ovni-static parson-static common-static)
|
target_link_libraries(instr-static ovni-static parson-static common-static)
|
||||||
|
@ -115,7 +115,7 @@ function(ovni_test source)
|
|||||||
|
|
||||||
add_executable("${OVNI_TEST_NAME}" "${OVNI_TEST_SOURCE}")
|
add_executable("${OVNI_TEST_NAME}" "${OVNI_TEST_SOURCE}")
|
||||||
|
|
||||||
target_link_libraries("${OVNI_TEST_NAME}" PRIVATE ovni emu)
|
target_link_libraries("${OVNI_TEST_NAME}" PRIVATE ovni-static emu)
|
||||||
|
|
||||||
set(driver "${OVNI_TEST_SOURCE_DIR}/ovni-driver.sh")
|
set(driver "${OVNI_TEST_SOURCE_DIR}/ovni-driver.sh")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user