Commit bc5e4cb8 authored by Kohei Yoshida's avatar Kohei Yoshida

cmake: Apply the API version to the library name as well.

parent 756bfeb3
Pipeline #51345625 passed with stage
in 4 minutes and 4 seconds
......@@ -17,16 +17,16 @@ add_executable(ixion-formula-tokenizer
ixion_formula_tokenizer.cpp
)
target_link_libraries(ixion-parser libixion)
target_link_libraries(ixion-sorter libixion)
target_link_libraries(ixion-formula-tokenizer libixion)
target_link_libraries(ixion-parser libixion-${IXION_API_VERSION})
target_link_libraries(ixion-sorter libixion-${IXION_API_VERSION})
target_link_libraries(ixion-formula-tokenizer libixion-${IXION_API_VERSION})
# tests
# Copy the binaries necessary for running the parser tests below.
add_custom_command(TARGET ixion-parser POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:libixion> $<TARGET_FILE:ixion-parser>
$<TARGET_FILE:libixion-${IXION_API_VERSION}> $<TARGET_FILE:ixion-parser>
${CMAKE_CURRENT_BINARY_DIR}
)
......
add_library(libixion SHARED
add_library(libixion-${IXION_API_VERSION} SHARED
address.cpp
address_iterator.cpp
calc_status.cpp
......@@ -39,9 +39,9 @@ add_library(libixion SHARED
configure_file(constants.inl.in constants.inl)
target_compile_definitions(libixion PRIVATE IXION_BUILD DLL_EXPORT)
target_compile_definitions(libixion-${IXION_API_VERSION} PRIVATE IXION_BUILD DLL_EXPORT)
install(TARGETS libixion
install(TARGETS libixion-${IXION_API_VERSION}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
......@@ -65,10 +65,10 @@ add_executable(compute-engine-test EXCLUDE_FROM_ALL
compute_engine_test.cpp
)
target_link_libraries(ixion-test libixion)
target_link_libraries(ixion-test-track-deps libixion)
target_link_libraries(dirty-cell-tracker-test libixion)
target_link_libraries(compute-engine-test libixion)
target_link_libraries(ixion-test libixion-${IXION_API_VERSION})
target_link_libraries(ixion-test-track-deps libixion-${IXION_API_VERSION})
target_link_libraries(dirty-cell-tracker-test libixion-${IXION_API_VERSION})
target_link_libraries(compute-engine-test libixion-${IXION_API_VERSION})
add_dependencies(check
ixion-test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment