Fixed LDC 1 config file installation.

Closes #79.

Thanks to SiegeLord for the meat of the patch.
This commit is contained in:
David Nadlinger
2012-03-17 13:32:00 +01:00
parent c3621e171c
commit df61269ada
3 changed files with 12 additions and 8 deletions

View File

@@ -297,6 +297,8 @@ get_target_property(LDC_LOC ${LDC_EXE} LOCATION)
# Install target.
#
add_subdirectory(runtime)
install(TARGETS ${LDC_EXE} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(PROGRAMS ${PROJECT_SOURCE_DIR}/bin/${LDMD_EXE} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(FILES ${PROJECT_BINARY_DIR}/bin/${LDC_EXE}_install.conf DESTINATION ${CONF_INST_DIR} RENAME ${LDC_EXE}.conf)
@@ -306,6 +308,3 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
install(DIRECTORY bash_completion.d DESTINATION ${CONF_INST_DIR})
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(D_VERSION EQUAL 2)
add_subdirectory(runtime)
endif()

View File

@@ -8,7 +8,7 @@ default:
// arguments before they are parsed.
switches = [
"-I@INCLUDE_INSTALL_DIR@/@RUNTIME_AIO@",
"-I@INCLUDE_INSTALL_DIR@/ldc",
"-I@INCLUDE_INSTALL_DIR@/@RUNTIME_AIO@/core/vendor/ldc",
"-I@INCLUDE_INSTALL_DIR@",
"-L-L@CMAKE_INSTALL_LIBDIR@",
"-d-version=Tango",

View File

@@ -6,10 +6,6 @@ cmake_minimum_required(VERSION 2.6)
# Main configuration.
#
if(D_VERSION EQUAL 1)
message(FATAL_ERROR "Please use bob to build Tango for D1.")
endif()
include(CheckTypeSize)
check_type_size(void* ptr_size)
if(${ptr_size} MATCHES "^8$") ## if it's 64-bit OS
@@ -42,6 +38,15 @@ endif(BUILD_SHARED_LIBS)
get_directory_property(PROJECT_PARENT_DIR DIRECTORY ${PROJECT_SOURCE_DIR} PARENT_DIRECTORY)
set(RUNTIME_DIR ${PROJECT_SOURCE_DIR}/druntime CACHE PATH "runtime source dir")
if(D_VERSION EQUAL 1)
set(RUNTIME_AIO tango)
configure_file(${PROJECT_PARENT_DIR}/${LDC_EXE}_install.conf.in ${PROJECT_BINARY_DIR}/../bin/${LDC_EXE}_install.conf)
configure_file(${PROJECT_PARENT_DIR}/${LDC_EXE}.rebuild.conf.in ${PROJECT_BINARY_DIR}/../bin/${LDC_EXE}_install.rebuild.conf)
message(STATUS "Note: Tango is no longer included in D1 builds, please compile and install it separately using its own build infrastructure (bob).")
return()
endif()
#
# Gather source files.
#