Drop outdated targets and fix solution folders

pull/704/head
Andrey Kamaev 12 years ago
parent ec8aec09ec
commit f282498b1d
  1. 54
      cmake/OpenCVExtraTargets.cmake
  2. 3
      cmake/OpenCVModule.cmake
  3. 4
      modules/java/test/CMakeLists.txt
  4. 6
      samples/cpp/CMakeLists.txt

@ -13,57 +13,7 @@ endif()
# ----------------------------------------------------------------------------
# Source package, for "make package_source"
# ----------------------------------------------------------------------------
if(BUILD_PACKAGE)
set(TARBALL_NAME "${CMAKE_PROJECT_NAME}-${OPENCV_VERSION}")
if (NOT WIN32)
if(APPLE)
set(TAR_CMD gnutar)
else()
set(TAR_CMD tar)
endif()
set(TAR_TRANSFORM "\"s,^,${TARBALL_NAME}/,\"")
add_custom_target(package_source
#TODO: maybe we should not remove dll's
COMMAND ${TAR_CMD} --transform ${TAR_TRANSFORM} -cjpf ${CMAKE_CURRENT_BINARY_DIR}/${TARBALL_NAME}.tar.bz2 --exclude=".svn" --exclude=".git" --exclude="*.pyc" --exclude="*.vcproj" --exclude="*/lib/*" --exclude="*.dll" ./
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
else()
add_custom_target(package_source
COMMAND zip -9 -r ${CMAKE_CURRENT_BINARY_DIR}/${TARBALL_NAME}.zip . -x '*/.svn/*' '*/.git/*' '*.vcproj' '*.pyc'
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endif()
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(package_source PROPERTIES FOLDER "extra")
endif()
endif()
# ----------------------------------------------------------------------------
# performance tests, for "make perf"
# ----------------------------------------------------------------------------
if(BUILD_PERF_TESTS AND PYTHON_EXECUTABLE)
if(CMAKE_VERSION VERSION_GREATER "2.8.2")
add_custom_target(perf
${PYTHON_EXECUTABLE} "${OpenCV_SOURCE_DIR}/modules/ts/misc/run.py" --configuration $<CONFIGURATION> "${CMAKE_BINARY_DIR}"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
DEPENDS "${OpenCV_SOURCE_DIR}/modules/ts/misc/run.py"
)
else()
add_custom_target(perf
${PYTHON_EXECUTABLE} "${OpenCV_SOURCE_DIR}/modules/ts/misc/run.py" "${CMAKE_BINARY_DIR}"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
DEPENDS "${OpenCV_SOURCE_DIR}/modules/ts/misc/run.py"
)
endif()
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(perf PROPERTIES FOLDER "extra")
endif()
endif()
# ----------------------------------------------------------------------------
# spefial targets to build all OpenCV modules
# target building all OpenCV modules
# ----------------------------------------------------------------------------
add_custom_target(opencv_modules)
if(ENABLE_SOLUTION_FOLDERS)
@ -72,7 +22,7 @@ endif()
# ----------------------------------------------------------------------------
# spefial targets to build all tests
# targets building all tests
# ----------------------------------------------------------------------------
if(BUILD_TESTS)
add_custom_target(opencv_tests)

@ -635,9 +635,6 @@ function(ocv_add_perf_tests)
ocv_add_precompiled_headers(${the_target})
if (PYTHON_EXECUTABLE)
add_dependencies(perf ${the_target})
endif()
else(OCV_DEPENDENCIES_FOUND)
# TODO: warn about unsatisfied dependencies
endif(OCV_DEPENDENCIES_FOUND)

@ -75,3 +75,7 @@ add_custom_command(OUTPUT "${opencv_test_java_bin_dir}/build/jar/opencv-test.jar
add_custom_target(${PROJECT_NAME} ALL SOURCES "${opencv_test_java_bin_dir}/build/jar/opencv-test.jar")
add_dependencies(${PROJECT_NAME} ${the_module})
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "tests accuracy")
endif()

@ -32,9 +32,11 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
if("${srcs}" MATCHES "tutorial_code")
set(sample_kind tutorial)
set(sample_KIND TUTORIAL)
set(sample_folder "samples//tutorials")
else()
set(sample_kind example)
set(sample_KIND EXAMPLE)
set(sample_folder "samples//cpp")
endif()
set(the_target "${sample_kind}_${name}")
@ -50,7 +52,7 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
PROJECT_LABEL "(${sample_KIND}) ${name}")
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${the_target} PROPERTIES FOLDER "${sample_kind}s//cpp")
set_target_properties(${the_target} PROPERTIES FOLDER "${sample_folder}")
endif()
if(WIN32)
@ -58,7 +60,7 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
set_target_properties(${the_target} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:atlsd.lib /DEBUG")
endif()
install(TARGETS ${the_target}
RUNTIME DESTINATION "${sample_kind}s/cpp" COMPONENT main)
RUNTIME DESTINATION "${sample_folder}" COMPONENT main)
endif()
ENDMACRO()

Loading…
Cancel
Save