File: cmake-change-for-debian-build

package info (click to toggle)
lua-torch-paths 0~20161027-g2bc6460-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 172 kB
  • ctags: 72
  • sloc: ansic: 971; makefile: 10; sh: 3
file content (52 lines) | stat: -rw-r--r-- 1,333 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
This hack makes the CMakeLists merely generate a paths.h file,
and prevents it from doing other things.

Forwarded: NO, Never forward this patch.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,9 +1,5 @@
 cmake_minimum_required(VERSION 2.6)
 
-INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
-INCLUDE_DIRECTORIES("${LUA_INCDIR}")
-LINK_DIRECTORIES("${LUA_LIBDIR}")
-
 INCLUDE(CheckIncludeFiles)
 INCLUDE(CheckFunctionExists)
 INCLUDE(CheckLibraryExists)
@@ -23,35 +19,3 @@
 ENDIF (UNIX OR NOT WIN32)
 
 CONFIGURE_FILE("paths.h.in" "${CMAKE_CURRENT_BINARY_DIR}/paths.h")
-
-SET(src 
-  "${CMAKE_CURRENT_SOURCE_DIR}/paths.c"
-  "${CMAKE_CURRENT_BINARY_DIR}/paths.h" )
-
-SET(luasrc 
-  "${CMAKE_CURRENT_SOURCE_DIR}/init.lua")
-
-# When using MSVC
-IF(MSVC)
-  # we want to respect the standard, and we are bored of those **** .
-  ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE=1)
-ENDIF(MSVC)
-
-ADD_LIBRARY("paths" MODULE ${src})
-SET_TARGET_PROPERTIES("paths" PROPERTIES
-  PREFIX "lib"
-  IMPORT_PREFIX "lib")
-
-IF(APPLE)
-  SET_TARGET_PROPERTIES("paths" PROPERTIES
-    LINK_FLAGS "-undefined dynamic_lookup")
-ENDIF()
-
-INSTALL(FILES ${luasrc} DESTINATION ${LUADIR}/paths)
-INSTALL(TARGETS paths
-  LIBRARY DESTINATION ${LIBDIR}
-  RUNTIME DESTINATION ${LIBDIR})
-
-IF(LUALIB)
-  TARGET_LINK_LIBRARIES(paths ${LUALIB})
-ENDIF()