Skip to content

Commit

Permalink
[EN-8288] Separate samples' and tools' files into different directori…
Browse files Browse the repository at this point in the history
…es within the zip bundle
  • Loading branch information
ttldtor authored Dec 6, 2023
2 parents 8c7f936 + 797db49 commit d3abb4a
Show file tree
Hide file tree
Showing 14 changed files with 211 additions and 201 deletions.
73 changes: 63 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,36 +67,89 @@ jobs:
- name: Prepare build
run: |
ls
mkdir ${{github.workspace}}/build-${{matrix.buildType}}
mkdir ${{github.workspace}}/build-${{matrix.buildType}}
- name: Configure CMake (Win)
- name: Prepare build (Samples & Tools)
if: ${{ !contains(matrix.buildType, 'Deb') }}
run: |
ls
mkdir ${{github.workspace}}/build-Samples
mkdir ${{github.workspace}}/build-Tools
- name: Configure CMake (Win::Lib)
if: ${{ contains(matrix.os, 'windows') }}
run: cmake -B ${{github.workspace}}/build-${{matrix.buildType}} -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION="${{needs.get_version.outputs.version}}" -DDXFCXX_PACKAGE_SUFFIX="-${{matrix.buildType}}"
run: cmake -B ${{github.workspace}}/build-${{matrix.buildType}} -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION="${{needs.get_version.outputs.version}}" -DDXFCXX_PACKAGE_SUFFIX="-${{matrix.buildType}}" -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_SAMPLES=OFF -DDXFCXX_INSTALL_TOOLS=OFF

- name: Configure CMake (MacOS)
- name: Configure CMake (Win::Samples & Tools)
if: ${{ contains(matrix.os, 'windows') && !contains(matrix.buildType, 'Deb') }}
run: |
cmake -B ${{github.workspace}}/build-Samples -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION="${{needs.get_version.outputs.version}}" -DDXFCXX_PACKAGE_SUFFIX="-Samples" -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_TOOLS=OFF
cmake -B ${{github.workspace}}/build-Tools -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION="${{needs.get_version.outputs.version}}" -DDXFCXX_PACKAGE_SUFFIX="-Tools" -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_SAMPLES=OFF
- name: Configure CMake (MacOS::Lib)
if: ${{ contains(matrix.os, 'macos') }}
run: cmake -B ${{github.workspace}}/build-${{matrix.buildType}} -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-${{matrix.buildType}}
run: cmake -B ${{github.workspace}}/build-${{matrix.buildType}} -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-${{matrix.buildType}} -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_SAMPLES=OFF -DDXFCXX_INSTALL_TOOLS=OFF

- name: Configure CMake (Ubuntu)
- name: Configure CMake (MacOS::Samples & Tools)
if: ${{ contains(matrix.os, 'macos') && !contains(matrix.buildType, 'Deb') }}
run: |
cmake -B ${{github.workspace}}/build-Samples -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-Samples -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_TOOLS=OFF
cmake -B ${{github.workspace}}/build-Tools -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-Tools -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_SAMPLES=OFF
- name: Configure CMake (Ubuntu::Lib)
env:
CC: gcc-${{env.GCC_VERSION}}
CXX: g++-${{env.GCC_VERSION}}
if: ${{ contains(matrix.os, 'ubuntu') }}
run: cmake -B ${{github.workspace}}/build-${{matrix.buildType}} -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-${{matrix.buildType}}
run: cmake -B ${{github.workspace}}/build-${{matrix.buildType}} -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-${{matrix.buildType}} -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_SAMPLES=OFF -DDXFCXX_INSTALL_TOOLS=OFF

- name: Configure CMake (Ubuntu::Samples & Tools)
env:
CC: gcc-${{env.GCC_VERSION}}
CXX: g++-${{env.GCC_VERSION}}
if: ${{ contains(matrix.os, 'ubuntu') && !contains(matrix.buildType, 'Deb') }}
run: |
cmake -B ${{github.workspace}}/build-Samples -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-Samples -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_TOOLS=OFF -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_TOOLS=OFF
cmake -B ${{github.workspace}}/build-Tools -DCMAKE_BUILD_TYPE=${{matrix.buildType}} -DDXFCXX_VERSION=${{needs.get_version.outputs.version}} -DDXFCXX_PACKAGE_SUFFIX=-Tools -DDXFCXX_BUILD_UNIT_TESTS=OFF -DDXFCXX_BUILD_SAMPLES=OFF -DDXFCXX_INSTALL_LIB=OFF -DDXFCXX_INSTALL_SAMPLES=OFF
- name: Build
- name: Build (Lib)
run: cmake --build ${{github.workspace}}/build-${{matrix.buildType}} --config ${{matrix.buildType}}

- name: Pack
- name: Build (Samples & Tools)
if: ${{ !contains(matrix.buildType, 'Deb') }}
run: |
cmake --build ${{github.workspace}}/build-Samples --config ${{matrix.buildType}}
cmake --build ${{github.workspace}}/build-Tools --config ${{matrix.buildType}}
- name: Pack (Lib)
working-directory: ${{github.workspace}}/build-${{matrix.buildType}}
run: cpack -G ZIP -C ${{matrix.buildType}} --config ./dxFeedGraalCxxApiPackConfig.cmake

- name: Upload
- name: Pack (Samples)
if: ${{ !contains(matrix.buildType, 'Deb') }}
working-directory: ${{github.workspace}}/build-Samples
run: cpack -G ZIP -C ${{matrix.buildType}} --config ./dxFeedGraalCxxApiPackConfig.cmake

- name: Pack (Tools)
if: ${{ !contains(matrix.buildType, 'Deb') }}
working-directory: ${{github.workspace}}/build-Tools
run: cpack -G ZIP -C ${{matrix.buildType}} --config ./dxFeedGraalCxxApiPackConfig.cmake

- name: Upload (Lib)
uses: actions/upload-artifact@v3
with:
name: artifacts
path: build-${{matrix.buildType}}/*.zip

- name: Upload (Samples & Tools)
if: ${{ !contains(matrix.buildType, 'Deb') }}
uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
build-Samples/*.zip
build-Tools/*.zip
publish_release:
if: ${{ inputs.publish || contains(github.event_name, 'push')}}
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ if (DXFCXX_INSTALL)
install(TARGETS ${PROJECT_NAME})
install(TARGETS ${PROJECT_NAME}_static)
install(DIRECTORY "include" DESTINATION "." PATTERN "build" EXCLUDE)
install(FILES "LICENSE" "README.md" DESTINATION ".")
endif ()

install(FILES "LICENSE" "README.md" "THIRD_PARTY_LICENSES.md" DESTINATION ".")
endif ()
68 changes: 37 additions & 31 deletions samples/cpp/ConvertTapeFile/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,42 +35,48 @@ endif ()

add_executable(${PROJECT_NAME} src/main.cpp)

if (DXFCXX_ENABLE_VS_ASAN)
target_compile_options(${PROJECT_NAME} PRIVATE "/fsanitize=address")
target_link_options(${PROJECT_NAME} PRIVATE "/fsanitize=address")
#if (DXFCXX_ENABLE_VS_ASAN)
# target_compile_options(${PROJECT_NAME} PRIVATE "/fsanitize=address")
# target_link_options(${PROJECT_NAME} PRIVATE "/fsanitize=address")
#
# target_compile_definitions(${PROJECT_NAME}
# PUBLIC
# $<$<COMPILE_LANG_AND_ID:CXX,MSVC>:
# _DISABLE_VECTOR_ANNOTATION
# _DISABLE_STRING_ANNOTATION
# >
# )
#endif ()

target_compile_definitions(${PROJECT_NAME}
PUBLIC
$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:
_DISABLE_VECTOR_ANNOTATION
_DISABLE_STRING_ANNOTATION
>
)
endif ()
#if (DXFCXX_ENABLE_ASAN_UBSAN)
# target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx)
# target_compile_definitions(${PROJECT_NAME} PRIVATE DXFCPP_USE_DLLS)
# add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
# $<TARGET_FILE:dxfcxx::graal>
# ${CMAKE_CURRENT_SOURCE_DIR}/ConvertTapeFile.in
# $<TARGET_FILE:dxfcxx>
# $<TARGET_FILE_DIR:${PROJECT_NAME}>)
# target_compile_options(${PROJECT_NAME} PRIVATE "-fsanitize=address" "-fsanitize=undefined")
# target_link_options(${PROJECT_NAME} PRIVATE "-fsanitize=address" "-fsanitize=undefined")
#else ()
# target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx::static)
# add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
# $<TARGET_FILE:dxfcxx::graal>
# ${CMAKE_CURRENT_SOURCE_DIR}/ConvertTapeFile.in
# $<TARGET_FILE_DIR:${PROJECT_NAME}>)
#endif ()

if (DXFCXX_ENABLE_ASAN_UBSAN)
target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx)
target_compile_definitions(${PROJECT_NAME} PRIVATE DXFCPP_USE_DLLS)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:dxfcxx::graal>
${CMAKE_CURRENT_SOURCE_DIR}/ConvertTapeFile.in
$<TARGET_FILE:dxfcxx>
$<TARGET_FILE_DIR:${PROJECT_NAME}>)
target_compile_options(${PROJECT_NAME} PRIVATE "-fsanitize=address" "-fsanitize=undefined")
target_link_options(${PROJECT_NAME} PRIVATE "-fsanitize=address" "-fsanitize=undefined")
else ()
target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx::static)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:dxfcxx::graal>
${CMAKE_CURRENT_SOURCE_DIR}/ConvertTapeFile.in
$<TARGET_FILE_DIR:${PROJECT_NAME}>)
endif ()
target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx::static)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:dxfcxx::graal>
${CMAKE_CURRENT_SOURCE_DIR}/ConvertTapeFile.in
$<TARGET_FILE_DIR:${PROJECT_NAME}>)

if (DXFCXX_INSTALL AND DXFCXX_INSTALL_SAMPLES)
install(TARGETS ${PROJECT_NAME})
install(FILES "ConvertTapeFile.in" DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME})
install(FILES "ConvertTapeFile.in" DESTINATION ${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME})

if (WIN32)
install(FILES $<TARGET_FILE:dxfcxx::graal> DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES $<TARGET_FILE:dxfcxx::graal> DESTINATION ${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME})
endif ()
endif ()
42 changes: 5 additions & 37 deletions samples/cpp/DxFeedConnect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,45 +37,13 @@ add_executable(${PROJECT_NAME} src/main.cpp)

target_include_directories(${PROJECT_NAME} PRIVATE ../../../third_party/range-v3-0.12/include)

if (DXFCXX_ENABLE_VS_ASAN)
target_compile_options(${PROJECT_NAME} PRIVATE "/fsanitize=address")
target_link_options(${PROJECT_NAME} PRIVATE "/fsanitize=address")

target_compile_definitions(${PROJECT_NAME}
PUBLIC
$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:
_DISABLE_VECTOR_ANNOTATION
_DISABLE_STRING_ANNOTATION
>
)
endif ()

if (DXFCXX_ENABLE_ASAN_UBSAN)
target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx )
target_compile_definitions(${PROJECT_NAME} PRIVATE DXFCPP_USE_DLLS)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:dxfcxx::graal>
$<TARGET_FILE:dxfcxx>
$<TARGET_FILE_DIR:${PROJECT_NAME}>)

target_compile_options(${PROJECT_NAME} PRIVATE "-fsanitize=address" "-fsanitize=undefined")
target_link_options(${PROJECT_NAME} PRIVATE "-fsanitize=address" "-fsanitize=undefined")
else ()
target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx date::date)
target_compile_definitions(${PROJECT_NAME} PRIVATE DXFCPP_USE_DLLS)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:dxfcxx::graal>
$<TARGET_FILE:dxfcxx>
$<TARGET_FILE_DIR:${PROJECT_NAME}>)
# target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx::static)
#
# add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
# $<TARGET_FILE:dxfcxx::graal>
# $<TARGET_FILE_DIR:${PROJECT_NAME}>)
endif ()
target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx::static)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:dxfcxx::graal>
$<TARGET_FILE_DIR:${PROJECT_NAME}>)

if (DXFCXX_INSTALL AND DXFCXX_INSTALL_SAMPLES)
install(TARGETS ${PROJECT_NAME})
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})

if (WIN32)
install(FILES $<TARGET_FILE:dxfcxx::graal> DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand Down
42 changes: 5 additions & 37 deletions samples/cpp/DxFeedFileParser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,45 +35,13 @@ endif ()

add_executable(${PROJECT_NAME} src/main.cpp)

if (DXFCXX_ENABLE_VS_ASAN)
target_compile_options(${PROJECT_NAME} PRIVATE "/fsanitize=address")
target_link_options(${PROJECT_NAME} PRIVATE "/fsanitize=address")

target_compile_definitions(${PROJECT_NAME}
PUBLIC
$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:
_DISABLE_VECTOR_ANNOTATION
_DISABLE_STRING_ANNOTATION
>
)
endif ()

if (DXFCXX_ENABLE_ASAN_UBSAN)
target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx)
target_compile_definitions(${PROJECT_NAME} PRIVATE DXFCPP_USE_DLLS)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:dxfcxx::graal>
$<TARGET_FILE:dxfcxx>
$<TARGET_FILE_DIR:${PROJECT_NAME}>)

target_compile_options(${PROJECT_NAME} PRIVATE "-fsanitize=address" "-fsanitize=undefined")
target_link_options(${PROJECT_NAME} PRIVATE "-fsanitize=address" "-fsanitize=undefined")
else ()
target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx)
target_compile_definitions(${PROJECT_NAME} PRIVATE DXFCPP_USE_DLLS)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:dxfcxx::graal>
$<TARGET_FILE:dxfcxx>
$<TARGET_FILE_DIR:${PROJECT_NAME}>)
# target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx::static)
#
# add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
# $<TARGET_FILE:dxfcxx::graal>
# $<TARGET_FILE_DIR:${PROJECT_NAME}>)
endif ()
target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx::static)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:dxfcxx::graal>
$<TARGET_FILE_DIR:${PROJECT_NAME}>)

if (DXFCXX_INSTALL AND DXFCXX_INSTALL_SAMPLES)
install(TARGETS ${PROJECT_NAME})
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})

if (WIN32)
install(FILES $<TARGET_FILE:dxfcxx::graal> DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand Down
12 changes: 4 additions & 8 deletions samples/cpp/DxFeedIpfConnect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,17 @@ endif ()

add_executable(${PROJECT_NAME} src/main.cpp)

#target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx::static)
target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx)
target_compile_definitions(${PROJECT_NAME} PRIVATE DXFCPP_USE_DLLS)

target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx::static)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:dxfcxx::graal>
$<TARGET_FILE:dxfcxx>
${CMAKE_CURRENT_SOURCE_DIR}/dxfeed.properties
$<TARGET_FILE_DIR:${PROJECT_NAME}>)

if (DXFCXX_INSTALL AND DXFCXX_INSTALL_SAMPLES)
install(TARGETS ${PROJECT_NAME})
install(FILES "dxfeed.properties" DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME})
install(FILES "dxfeed.properties" DESTINATION ${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME})

if (WIN32)
install(FILES $<TARGET_FILE:dxfcxx::graal> DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES $<TARGET_FILE:dxfcxx::graal> DESTINATION ${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME})
endif ()
endif ()
8 changes: 2 additions & 6 deletions samples/cpp/DxFeedLiveIpfSample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,13 @@ endif ()

add_executable(${PROJECT_NAME} src/main.cpp)

#target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx::static)
target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx)
target_compile_definitions(${PROJECT_NAME} PRIVATE DXFCPP_USE_DLLS)

target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx::static)
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:dxfcxx::graal>
$<TARGET_FILE:dxfcxx>
$<TARGET_FILE_DIR:${PROJECT_NAME}>)

if (DXFCXX_INSTALL AND DXFCXX_INSTALL_SAMPLES)
install(TARGETS ${PROJECT_NAME})
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})

if (WIN32)
install(FILES $<TARGET_FILE:dxfcxx::graal> DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand Down
10 changes: 3 additions & 7 deletions samples/cpp/DxFeedSample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,16 @@ endif ()
add_executable(${PROJECT_NAME} src/main.cpp)

target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx::static)
#target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx)
#target_compile_definitions(${PROJECT_NAME} PRIVATE DXFCPP_USE_DLLS)

add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:dxfcxx::graal>
# $<TARGET_FILE:dxfcxx>
${CMAKE_CURRENT_SOURCE_DIR}/dxfeed.properties
$<TARGET_FILE_DIR:${PROJECT_NAME}>)

if (DXFCXX_INSTALL AND DXFCXX_INSTALL_SAMPLES)
install(TARGETS ${PROJECT_NAME})
install(FILES "dxfeed.properties" DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME})
install(FILES "dxfeed.properties" DESTINATION ${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME})

if (WIN32)
install(FILES $<TARGET_FILE:dxfcxx::graal> DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES $<TARGET_FILE:dxfcxx::graal> DESTINATION ${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME})
endif ()
endif ()
11 changes: 3 additions & 8 deletions samples/cpp/PrintQuoteEvents/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,18 @@ elseif (UNIX)
endif ()

add_executable(${PROJECT_NAME} src/main.cpp)
target_include_directories(${PROJECT_NAME} PRIVATE ../../../include)

target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx::static)
#target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx)
#target_compile_definitions(${PROJECT_NAME} PRIVATE DXFCPP_USE_DLLS)

add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:dxfcxx::graal>
# $<TARGET_FILE:dxfcxx>
${CMAKE_CURRENT_SOURCE_DIR}/dxfeed.properties
$<TARGET_FILE_DIR:${PROJECT_NAME}>)

if (DXFCXX_INSTALL AND DXFCXX_INSTALL_SAMPLES)
install(TARGETS ${PROJECT_NAME})
install(FILES "dxfeed.properties" DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME})
install(FILES "dxfeed.properties" DESTINATION ${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME})

if (WIN32)
install(FILES $<TARGET_FILE:dxfcxx::graal> DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES $<TARGET_FILE:dxfcxx::graal> DESTINATION ${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME})
endif ()
endif ()
Loading

0 comments on commit d3abb4a

Please sign in to comment.