diff runtime/CMakeLists.txt @ 828:03b0c817a1a3

added install target and possibility to pre- and suffix ldc's executable name to cmake scripts
author elrood
date Thu, 04 Dec 2008 22:09:24 +0100
parents 4ad1e7b10378
children 0a31c60a6bc1
line wrap: on
line diff
--- a/runtime/CMakeLists.txt	Thu Dec 04 16:13:40 2008 +0100
+++ b/runtime/CMakeLists.txt	Thu Dec 04 22:09:24 2008 +0100
@@ -28,7 +28,6 @@
 set(RUNTIME_DIR ${PROJECT_PARENT_DIR}/${RUNTIME} CACHE PATH "runtime source dir" FORCE)
 
 if(D_VERSION EQUAL 1)
-	set(LDC_EXE ldc)
 	# copy imports to runtime dir
 	add_custom_command(
 		OUTPUT ldc-imports
@@ -48,7 +47,6 @@
 	file(GLOB CORE_D ${RUNTIME_DIR}/lib/common/tango/core/*.d)
 	file(GLOB CORE_C ${RUNTIME_DIR}/lib/common/tango/stdc/*.c)
 elseif(D_VERSION EQUAL 2)
-	set(LDC_EXE ldc2)
 	set(RUNTIME_CC druntime-core)
 	set(RUNTIME_GC druntime-gc-basic)
 	set(RUNTIME_DC druntime-rt-ldc)
@@ -73,9 +71,10 @@
 	if(NOT LDC_LOC)
 		message(SEND_ERROR "ldc not found")
 	endif(NOT LDC_LOC)
+	set(LDC_EXE_NAME ${LDC_EXE})
 endif(NOT LDC_LOC)
 
-configure_file(${PROJECT_PARENT_DIR}/${LDC_EXE}.conf.in ${PROJECT_BINARY_DIR}/../bin/${LDC_EXE}.conf)
+configure_file(${PROJECT_PARENT_DIR}/${LDC_EXE}.conf.in ${PROJECT_BINARY_DIR}/../bin/${LDC_EXE_NAME}.conf)
 
 # patch runtime source, uses LDC_EXE for ldc / ldc2
 find_program(PATCH_EXE patch DOC "path to patch tool")
@@ -178,3 +177,5 @@
 
 # BCLIBS is empty if BUILD_BC_LIBS is not selected
 add_custom_target(runtime DEPENDS ${LIBS} ${BCLIBS})
+
+install(DIRECTORY ${PROJECT_BINARY_DIR}/../lib DESTINATION .)
\ No newline at end of file