summaryrefslogtreecommitdiffstats
path: root/Source/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r--Source/CMakeLists.txt23
1 files changed, 15 insertions, 8 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 3223831..a790994 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -364,6 +364,7 @@ set(SRCS
cmake.cxx
cmake.h
+ cm_auto_ptr.hxx
cm_get_date.h
cm_get_date.c
cm_sha2.h
@@ -529,11 +530,14 @@ set(SRCS ${SRCS}
cmNinjaUtilityTargetGenerator.h
)
+# Temporary variable for tools targets
+set(_tools)
+
if(WIN32 AND NOT CYGWIN)
set_source_files_properties(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501)
add_executable(cmcldeps cmcldeps.cxx ${MANIFEST_FILE})
+ list(APPEND _tools cmcldeps)
target_link_libraries(cmcldeps CMakeLib)
- install(TARGETS cmcldeps DESTINATION bin)
endif()
foreach(v CURL_CA_BUNDLE CURL_CA_PATH)
@@ -717,7 +721,9 @@ if(APPLE)
CPack/cmCPackBundleGenerator.cxx
CPack/cmCPackDragNDropGenerator.cxx
CPack/cmCPackOSXX11Generator.cxx
+ CPack/cmCPackPKGGenerator.cxx
CPack/cmCPackPackageMakerGenerator.cxx
+ CPack/cmCPackProductBuildGenerator.cxx
)
endif()
@@ -743,6 +749,7 @@ endif()
if(APPLE)
add_executable(cmakexbuild cmakexbuild.cxx)
+ list(APPEND _tools cmakexbuild)
target_link_libraries(cmakexbuild CMakeLib)
add_executable(OSXScriptLauncher
CPack/OSXScriptLauncher.cxx)
@@ -752,14 +759,17 @@ endif()
# Build CMake executable
add_executable(cmake cmakemain.cxx cmcmd.cxx cmcmd.h ${MANIFEST_FILE})
+list(APPEND _tools cmake)
target_link_libraries(cmake CMakeLib)
# Build CTest executable
add_executable(ctest ctest.cxx ${MANIFEST_FILE})
+list(APPEND _tools ctest)
target_link_libraries(ctest CTestLib)
# Build CPack executable
add_executable(cpack CPack/cpack.cxx ${MANIFEST_FILE})
+list(APPEND _tools cpack)
target_link_libraries(cpack CPackLib)
# Curses GUI
@@ -778,15 +788,12 @@ include (${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
# Install tools
-set(_tools cmake ctest cpack)
-
-if(APPLE)
- list(APPEND _tools cmakexbuild)
-endif()
-
foreach(_tool ${_tools})
CMake_OPTIONAL_COMPONENT(${_tool})
- install(TARGETS ${_tool} DESTINATION bin ${COMPONENT})
+ install(TARGETS ${_tool} DESTINATION ${CMAKE_BIN_DIR} ${COMPONENT})
endforeach()
install(FILES cmCPluginAPI.h DESTINATION ${CMAKE_DATA_DIR}/include)
+
+# Unset temporary variables
+unset(_tools)