mirror of
https://github.com/gosticks/openpose.git
synced 2026-08-16 22:30:19 +00:00
32 lines
1.2 KiB
CMake
32 lines
1.2 KiB
CMake
set(EXAMPLE_FILES
|
|
tutorial_add_module_custom_post_processing.cpp
|
|
tutorial_api_thread_1_user_processing_function.cpp
|
|
tutorial_api_thread_2_user_input_processing_output_and_datum.cpp)
|
|
|
|
include(${CMAKE_SOURCE_DIR}/cmake/Utils.cmake)
|
|
|
|
foreach(EXAMPLE_FILE ${EXAMPLE_FILES})
|
|
|
|
get_filename_component(SOURCE_NAME ${EXAMPLE_FILE} NAME_WE)
|
|
|
|
if (UNIX OR APPLE)
|
|
set(EXE_NAME "${SOURCE_NAME}.bin")
|
|
elseif (WIN32)
|
|
set(EXE_NAME "${SOURCE_NAME}")
|
|
endif ()
|
|
|
|
message(STATUS "Adding Example ${EXE_NAME}")
|
|
add_executable(${EXE_NAME} ${EXAMPLE_FILE})
|
|
target_link_libraries(${EXE_NAME} openpose ${examples_3rdparty_libraries})
|
|
|
|
if (WIN32)
|
|
set_property(TARGET ${EXE_NAME} PROPERTY FOLDER "Examples/Tutorial/Deprecated")
|
|
configure_file(${CMAKE_SOURCE_DIR}/cmake/OpenPose${VCXPROJ_FILE_GPU_MODE}.vcxproj.user
|
|
${CMAKE_CURRENT_BINARY_DIR}/${EXE_NAME}.vcxproj.user @ONLY)
|
|
# Properties->General->Output Directory
|
|
set_property(TARGET ${EXE_NAME} PROPERTY RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR}/$(Platform)/$(Configuration))
|
|
set_property(TARGET ${EXE_NAME} PROPERTY RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BINARY_DIR}/$(Platform)/$(Configuration))
|
|
endif (WIN32)
|
|
|
|
endforeach()
|