Mercurial > archived > louis > epitech > mq > rathaxes
annotate maintainers_refactor_the_build_system_to_allow_standalone_rathaxes_projects_with_cmake.patch @ 52:0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
author | Louis Opter <louis@lse.epitech.net> |
---|---|
date | Thu, 26 Jan 2012 17:26:47 +0100 |
parents | b109c72d897b |
children | 92b87bf82dd8 |
rev | line source |
---|---|
46
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
1 # HG changeset patch |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
2 # Parent 0861918d54e44cb25af0153bcac15647351ef6b1 |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
3 maintainers: make UseRathaxes.cmake usable in standalone projects |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
4 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
5 - UseRathaxes now does more Rathaxes related things (like search for |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
6 Codeworker); |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
7 - UseRathaxes (as well as FindCodeWorker, FindRathaxes...) could be distributed |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
8 with Rathaxes (i.e installed when you install Rathaxes) but then you have the |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
9 problem of finding the CMakeLists files from your (separate) project. That's |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
10 why I think it's simpler to just copy the CMakeLists each time in each |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
11 project (for now); |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
12 - Currently used by the examples; |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
13 - Should make the first steps guide really usable now; |
46
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
14 |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
15 diff --git a/CMakeLists.txt b/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
16 --- a/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
17 +++ b/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
18 @@ -27,27 +27,17 @@ |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
19 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
20 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
21 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
22 +INCLUDE(UseRathaxes) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
23 FIND_PACKAGE(LATEX) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
24 -FIND_PACKAGE(CodeWorker REQUIRED) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
25 -FIND_PACKAGE(LinuxKBuildDir) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
26 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
27 INCLUDE(AddFileDependencies) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
28 INCLUDE(FileCopy) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
29 INCLUDE(RathaxesCopyLatexClasses) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
30 -INCLUDE(UseRathaxes) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
31 - |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
32 -IF (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT LINUX_KBUILD_DIR) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
33 - MESSAGE(STATUS "No valid Linux build tree found, kernel modules will not be built") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
34 -ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT LINUX_KBUILD_DIR) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
35 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
36 # Global definitions ########################################################### |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
37 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
38 ENABLE_TESTING() |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
39 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
40 -IF (CMAKE_COMPILER_IS_GNUCC) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
41 - SET(CMAKE_C_FLAGS "-pipe -Wextra -Wall -std=c99") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
42 -ENDIF (CMAKE_COMPILER_IS_GNUCC) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
43 - |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
44 # Subdirectories ############################################################### |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
45 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
46 IF (PDFLATEX_COMPILER AND PS2PDF_CONVERTER) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
47 diff --git a/maintainers/CMakeLists.txt b/maintainers/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
48 --- a/maintainers/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
49 +++ b/maintainers/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
50 @@ -10,6 +10,6 @@ |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
51 INSTALL(PROGRAMS ${CODEWORKER_BINARY_PATH} |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
52 DESTINATION lib/rathaxes/) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
53 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
54 -# Generate the install rules for the rathaxes binaries: |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
55 +# Generate the install rules for the rathaxes binaries |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
56 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
57 ADD_SUBDIRECTORY(bin) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
58 diff --git a/maintainers/CMakeScripts/FindCodeWorker.cmake b/maintainers/CMakeScripts/FindCodeWorker.cmake |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
59 --- a/maintainers/CMakeScripts/FindCodeWorker.cmake |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
60 +++ b/maintainers/CMakeScripts/FindCodeWorker.cmake |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
61 @@ -50,7 +50,7 @@ |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
62 IF (UNIX) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
63 EXECUTE_PROCESS(COMMAND "chmod" "+x" "${CODEWORKER_BINARY_PATH}") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
64 IF (CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
65 - MESSAGE(STATUS "CodeWorker needs the 32bit compatability libraries (ia32-libs), make sure you have them!") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
66 + MESSAGE(STATUS "CodeWorker needs the 32bit compatibility libraries (ia32-libs), make sure you have them!") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
67 ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
68 ENDIF (UNIX) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
69 ELSE (${CODEWORKER_DL_RETURN} EQUAL 0) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
70 diff --git a/maintainers/CMakeScripts/FindRathaxes.cmake b/maintainers/CMakeScripts/FindRathaxes.cmake |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
71 new file mode 100644 |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
72 --- /dev/null |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
73 +++ b/maintainers/CMakeScripts/FindRathaxes.cmake |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
74 @@ -0,0 +1,18 @@ |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
75 +# Package Finder for Rathaxes and CMake. |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
76 +# |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
77 +# This finder simply seek for the rathaxes compiler and stores its path in the |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
78 +# variable RATHAXES_BINARY_PATH, if rathaxes is found. |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
79 +# |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
80 +# This finder is used internally by UseRathaxes. |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
81 + |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
82 +IF (NOT RATHAXES_BINARY_PATH) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
83 + FIND_PROGRAM(RATHAXES_BINARY_PATH |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
84 + NAMES |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
85 + rathaxes) |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
86 +ELSE (NOT RATHAXES_BINARY_PATH) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
87 + SET(RATHAXES_FIND_QUIETLY TRUE) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
88 +ENDIF (NOT RATHAXES_BINARY_PATH) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
89 + |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
90 +INCLUDE(FindPackageHandleStandardArgs) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
91 + |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
92 +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Rathaxes DEFAULT_MSG RATHAXES_BINARY_PATH) |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
93 diff --git a/maintainers/CMakeScripts/UseRathaxes.cmake b/maintainers/CMakeScripts/UseRathaxes.cmake |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
94 --- a/maintainers/CMakeScripts/UseRathaxes.cmake |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
95 +++ b/maintainers/CMakeScripts/UseRathaxes.cmake |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
96 @@ -1,3 +1,12 @@ |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
97 +# CMake library to easily make Rathaxes projects. |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
98 +# |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
99 +# This library depends on: |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
100 +# - FindCodeWorker.cmake; |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
101 +# - FindRathaxes.cmake; |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
102 +# - FindLinuxKBuildDir.cmake (could be made optional). |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
103 + |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
104 +# Functions #################################################################### |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
105 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
106 FUNCTION(_RTX_PARSE_OPTIONS ARGS RTI_OUT BLT_OUT SYSTEM_OUT) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
107 SET(OPTIONS "RTI" "BLT" "SYSTEM") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
108 SET(FILE_LISTS ${RTI_OUT} ${BLT_OUT} ${SYSTEM_OUT}) |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
109 @@ -38,13 +47,13 @@ |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
110 SYSTEMS) # [in] name of each target system |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
111 FOREACH(RTI ${RTI_FILES}) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
112 LIST(APPEND ${REGISTER_COMMANDS_OUT} |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
113 - "COMMAND" ${_RTX_CODEWORKER_COMMAND} |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
114 + "COMMAND" ${_USE_RATHAXES_CODEWORKER_COMMAND} |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
115 "rti-register" "${CMAKE_CURRENT_SOURCE_DIR}/${RTI}") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
116 ENDFOREACH(RTI ${RTI_FILES}) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
117 |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
118 FOREACH(BLT ${BLT_FILES}) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
119 LIST(APPEND ${REGISTER_COMMANDS_OUT} |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
120 - "COMMAND" ${_RTX_CODEWORKER_COMMAND} |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
121 + "COMMAND" ${_USE_RATHAXES_CODEWORKER_COMMAND} |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
122 "blt-register" "${CMAKE_CURRENT_SOURCE_DIR}/${BLT}") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
123 ENDFOREACH(BLT ${BLT_FILES}) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
124 |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
125 @@ -53,7 +62,7 @@ |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
126 # At some point I guess we will use different directories instead of |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
127 # different file names. |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
128 LIST(APPEND ${GENERATE_COMMANDS_OUT} |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
129 - COMMAND ${_RTX_CODEWORKER_COMMAND} |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
130 + COMMAND ${_USE_RATHAXES_CODEWORKER_COMMAND} |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
131 "generate" "/o" "${OUT_NAME}_${OS}.c" "${OS}" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
132 "${CMAKE_CURRENT_SOURCE_DIR}/${RTX_FILE}") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
133 ENDFOREACH(OS ${SYSTEMS}) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
134 @@ -85,13 +94,6 @@ |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
135 # At some point we will certainly have our own language definition for CMake |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
136 # but let's start with simpler things. |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
137 FUNCTION(ADD_RATHAXES_SOURCES OUT_NAME RTX_FILE) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
138 - SET(_RTX_CODEWORKER_COMMAND |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
139 - ${CODEWORKER_BINARY_PATH} "-nologo" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
140 - "-I" "${RATHAXES_SOURCE_DIR}/maintainers/cnorm/src" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
141 - "-I" "${RATHAXES_SOURCE_DIR}/rathaxes/compiler/" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
142 - "-script" "${CMAKE_SOURCE_DIR}/rathaxes/compiler/rathaxes.cws" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
143 - "-args" "${CMAKE_SOURCE_DIR}/rathaxes/" "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/RathaxesCache/") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
144 - |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
145 LIST(REMOVE_ITEM ARGV ${OUT_NAME} ${RTX_FILE}) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
146 |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
147 # We have to expand ARGV inside quotes, so it expand as a single LIST |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
148 @@ -118,7 +120,7 @@ |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
149 # that should be rebuilt automatically when its sources change. |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
150 STRING(REPLACE ";" ", " SYSTEMS "${SYSTEMS}") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
151 ADD_CUSTOM_COMMAND(OUTPUT ${OUTPUTS} |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
152 - COMMAND ${_RTX_CODEWORKER_COMMAND} "cache" "clear" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
153 + COMMAND ${_USE_RATHAXES_CODEWORKER_COMMAND} "cache" "clear" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
154 ${REGISTER_COMMANDS} |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
155 ${GENERATE_COMMANDS} |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
156 COMMENT "Building Rathaxes target ${OUT_NAME} for ${SYSTEMS}" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
157 @@ -188,8 +190,7 @@ |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
158 # Generate the Linux Makefile to build a Linux kernel module |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
159 SET(MODULE_MAKEFILE "${MODULE_BUILD_DIR}/Makefile") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
160 SET(LKM_OBJECTS "${RATHAXES_SOURCE}_${SYSTEM}.o") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
161 - CONFIGURE_FILE("${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts/Templates/MakefileLKM.in" |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
162 - "${MODULE_MAKEFILE}") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
163 + CONFIGURE_FILE("${_USE_RATHAXES_LIST_DIR}/Templates/MakefileLKM.in" "${MODULE_MAKEFILE}") |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
164 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
165 SET(KERNEL_OBJECT_NAME "${RATHAXES_SOURCE}_${SYSTEM}.ko") |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
166 ADD_CUSTOM_COMMAND(OUTPUT "${KERNEL_OBJECT_NAME}" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
167 @@ -216,11 +217,9 @@ |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
168 # Generate the Windows Makefile to build a Windows kernel module |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
169 SET(MODULE_SOURCES "${MODULE_BUILD_DIR}/sources") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
170 SET(LKM_SOURCES "${RATHAXES_SOURCE}_${SYSTEM}.c") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
171 - CONFIGURE_FILE("${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts/Templates/sources.in" |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
172 - "${MODULE_SOURCES}") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
173 + CONFIGURE_FILE("${_USE_RATHAXES_LIST_DIR}/Templates/sources.in" "${MODULE_SOURCES}") |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
174 |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
175 - SET(WINDOWS_MAKEFILE |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
176 - "${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts/Templates/Windows_Makefile") |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
177 + SET(WINDOWS_MAKEFILE "${_USE_RATHAXES_LIST_DIR}/Templates/Windows_Makefile") |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
178 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
179 SET(KERNEL_OBJECT_NAME "${RATHAXES_SOURCE}_${SYSTEM}.sys") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
180 ADD_CUSTOM_COMMAND(OUTPUT "${KERNEL_OBJECT_NAME}" |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
181 @@ -237,3 +236,47 @@ |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
182 MESSAGE(STATUS "Don't know how to build kernel modules for ${SYSTEM} (yet)") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
183 ENDIF (${SYSTEM} MATCHES "Linux") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
184 ENDFUNCTION(ADD_RATHAXES_LKM NAME RATHAXES_SOURCE) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
185 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
186 +# Code ######################################################################### |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
187 + |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
188 +# Inside a FUNCTION OR MACRO CMAKE_CURRENT_LIST_{DIR,FILE} return the path of |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
189 +# the caller CMakeLists.txt. Additionaly, CMAKE_CURRENT_LIST_DIR is a feature |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
190 +# of CMake >= 2.8.3. |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
191 +GET_FILENAME_COMPONENT(_USE_RATHAXES_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH CACHE) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
192 +MARK_AS_ADVANCED(_USE_RATHAXES_LIST_DIR) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
193 + |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
194 +# Find additional dependencies: |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
195 + |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
196 +# If we are within the Rathaxes project directly use CodeWorker and directly |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
197 +# point to the compiler files within the repository. |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
198 +# Else use the "system" rathaxes binary. |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
199 +IF (${PROJECT_NAME} STREQUAL RATHAXES) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
200 + FIND_PACKAGE(CodeWorker REQUIRED) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
201 + |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
202 + SET(_USE_RATHAXES_CODEWORKER_COMMAND |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
203 + ${CODEWORKER_BINARY_PATH} "-nologo" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
204 + "-I" "${RATHAXES_SOURCE_DIR}/maintainers/cnorm/src" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
205 + "-I" "${RATHAXES_SOURCE_DIR}/rathaxes/compiler/" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
206 + "-script" "${CMAKE_SOURCE_DIR}/rathaxes/compiler/rathaxes.cws" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
207 + "-args" "${CMAKE_SOURCE_DIR}/rathaxes/" "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/RathaxesCache/" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
208 + CACHE INTERNAL "CodeWorker command to -manually- invoke the Rathaxes compiler") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
209 +ELSE (${PROJECT_NAME} STREQUAL RATHAXES) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
210 + FIND_PACKAGE(Rathaxes REQUIRED) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
211 + |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
212 + SET(_USE_RATHAXES_CODEWORKER_COMMAND ${RATHAXES_BINARY_PATH} CACHE INTERNAL "Rathaxes command") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
213 +ENDIF (${PROJECT_NAME} STREQUAL RATHAXES) |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
214 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
215 +# Only do this on Linux, as far as I know nobody compiles Linux from another OS. |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
216 +IF (CMAKE_SYSTEM_NAME MATCHES "Linux") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
217 + FIND_PACKAGE(LinuxKBuildDir) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
218 + IF (LINUX_KBUILD_DIR) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
219 + MESSAGE(STATUS "No valid Linux build tree found, Linux kernel modules will not be built") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
220 + ENDIF (LINUX_KBUILD_DIR) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
221 +ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
222 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
223 +# Set some compiler options: |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
224 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
225 +# Set some sane flags that should be used in every project made with Rathaxes |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
226 +IF (CMAKE_COMPILER_IS_GNUCC) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
227 + SET(CMAKE_C_FLAGS "-pipe -Wextra -Wall -std=c99") |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
228 +ENDIF (CMAKE_COMPILER_IS_GNUCC) |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
229 diff --git a/maintainers/bin/CMakeLists.txt b/maintainers/bin/CMakeLists.txt |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
230 --- a/maintainers/bin/CMakeLists.txt |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
231 +++ b/maintainers/bin/CMakeLists.txt |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
232 @@ -19,7 +19,7 @@ |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
233 ENDIF (WIN32) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
234 |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
235 SET(CNORM_PATH "${PATH_PREFIX}/lib/rathaxes/cnorm/") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
236 -SET(COMPILER_PATH "${PATH_PREFIX}/lib/rathaxes/compiler/") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
237 +SET(RATHAXES_LIB "${PATH_PREFIX}/lib/rathaxes") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
238 SET(CODEWORKER_PATH "${PATH_PREFIX}/lib/rathaxes/codeworker${CMAKE_EXECUTABLE_SUFFIX}") |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
239 |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
240 CONFIGURE_FILE("${RATHAXES_SCRIPT_NAME}.in" "${RATHAXES_SCRIPT_NAME}" @ONLY) |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
241 diff --git a/maintainers/bin/rathaxes.bat b/maintainers/bin/rathaxes.bat |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
242 --- a/maintainers/bin/rathaxes.bat |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
243 +++ b/maintainers/bin/rathaxes.bat |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
244 @@ -1,6 +1,3 @@ |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
245 @echo off |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
246 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
247 -rem We have to explicitely give the path of the script as the first argument on |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
248 -rem Windows. |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
249 - |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
250 -%CODEWORKER% --quiet %INCLUDE_PATHS% -script %COMPILER_PATH%/rathaxes.cws -args %COMPILER_PATH%/rathaxes.cws %LOCAL_CACHE_PATH% %* |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
251 +%CODEWORKER% --quiet %INCLUDE_PATHS% -script %COMPILER_PATH%/rathaxes.cws -args %RATHAXES_LIB% %LOCAL_CACHE_PATH% %* |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
252 diff --git a/maintainers/bin/rathaxes.in b/maintainers/bin/rathaxes.in |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
253 --- a/maintainers/bin/rathaxes.in |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
254 +++ b/maintainers/bin/rathaxes.in |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
255 @@ -1,10 +1,11 @@ |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
256 #!/bin/sh |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
257 |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
258 CNORM_PATH="@CNORM_PATH@" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
259 -COMPILER_PATH="@COMPILER_PATH@" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
260 +RATHAXES_LIB="@RATHAXES_LIB@" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
261 +COMPILER_PATH="$RATHAXES_LIB/compiler" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
262 LOCAL_CACHE_PATH=${LOCAL_CACHE_PATH:-~/.rathaxes/cache} |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
263 |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
264 INCLUDE_PATHS="-I $CNORM_PATH -I $COMPILER_PATH" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
265 |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
266 exec @CODEWORKER_PATH@ --quiet $INCLUDE_PATHS \ |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
267 - -script $COMPILER_PATH/rathaxes.cws -args $COMPILER_PATH $LOCAL_CACHE_PATH $* |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
268 + -script $COMPILER_PATH/rathaxes.cws -args $RATHAXES_LIB $LOCAL_CACHE_PATH $* |
46
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
269 diff --git a/maintainers/bin/rathaxesvars.bat.in b/maintainers/bin/rathaxesvars.bat.in |
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
270 --- a/maintainers/bin/rathaxesvars.bat.in |
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
271 +++ b/maintainers/bin/rathaxesvars.bat.in |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
272 @@ -2,8 +2,14 @@ |
46
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
273 |
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
274 echo -- Setting up the Rathaxes environment |
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
275 |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
276 +rem This variable is simply used as a shortcut to the Rathaxes install |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
277 +rem directory (since we never know where it can be on Windows). Useful to |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
278 +rem specify some paths in the documentation. This is also used by the |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
279 +rem FindCodeWorker CMake finder. |
46
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
280 +set RATHAXES_PATH="%CD%" |
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
281 set CNORM_PATH="%CD%@CNORM_PATH@" |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
282 -set COMPILER_PATH="%CD%@COMPILER_PATH@" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
283 +set RATHAXES_LIB="%CD%@RATHAXES_LIB@" |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
284 +set COMPILER_PATH="%CD%%RATHAXES_LIB%/compiler" |
46
1cf60e316d19
Finish the patch on the doc and start a patch to fix the "rathaxes" binaries
Louis Opter <louis@lse.epitech.net>
parents:
diff
changeset
|
285 set LOCAL_CACHE_PATH="%LOCALAPPDATA%\\Rathaxes\\cache\\" |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
286 |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
287 set INCLUDE_PATHS=-I %CNORM_PATH% -I %COMPILER_PATH% |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
288 diff --git a/rathaxes/CMakeLists.txt b/rathaxes/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
289 --- a/rathaxes/CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
290 +++ b/rathaxes/CMakeLists.txt |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
291 @@ -26,4 +26,22 @@ |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
292 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
293 INSTALL(DIRECTORY compiler DESTINATION lib/rathaxes |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
294 PATTERN compiler/tests EXCLUDE) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
295 -INSTALL(DIRECTORY samples DESTINATION share/doc/rathaxes) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
296 +INSTALL(DIRECTORY samples DESTINATION share/doc/rathaxes |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
297 + PATTERN "SamplesCMakeLists.txt" EXCLUDE) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
298 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
299 +# Install rules for the "standalone" build system to generate the examples: |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
300 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
301 +# Top-level CMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
302 +INSTALL(FILES samples/SamplesCMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
303 + DESTINATION share/doc/rathaxes/samples |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
304 + RENAME CMakeLists.txt) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
305 +# CMakeScripts |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
306 +INSTALL(FILES |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
307 + ${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts/UseRathaxes.cmake |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
308 + ${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts/FindCodeWorker.cmake |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
309 + ${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts/FindRathaxes.cmake |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
310 + ${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts/FindLinuxKBuildDir.cmake |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
311 + DESTINATION share/doc/rathaxes/samples/CMakeScripts/) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
312 +# Templates used by the CMakeScripts |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
313 +INSTALL(DIRECTORY ${RATHAXES_SOURCE_DIR}/maintainers/CMakeScripts/Templates |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
314 + DESTINATION share/doc/rathaxes/samples/CMakeScripts/Template/) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
315 diff --git a/rathaxes/samples/SamplesCMakeLists.txt b/rathaxes/samples/SamplesCMakeLists.txt |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
316 new file mode 100644 |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
317 --- /dev/null |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
318 +++ b/rathaxes/samples/SamplesCMakeLists.txt |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
319 @@ -0,0 +1,14 @@ |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
320 +PROJECT(RTX_SAMPLES C) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
321 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
322 +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
323 + |
52
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
324 +LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeScripts) |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
325 + |
0ca794649028
Wip on the build system patch, use a FindRathaxes CMake finder, fix some paths in the installed rathaxes binaries
Louis Opter <louis@lse.epitech.net>
parents:
51
diff
changeset
|
326 +INCLUDE(UseRathaxes) |
51
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
327 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
328 +ENABLE_TESTING() |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
329 + |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
330 +ADD_SUBDIRECTORY(helloworld) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
331 +ADD_SUBDIRECTORY(syntax) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
332 +ADD_SUBDIRECTORY(e1000) |
b109c72d897b
Start a series to fix a bit the build system
Louis Opter <louis@lse.epitech.net>
parents:
46
diff
changeset
|
333 +ADD_SUBDIRECTORY(windows_minimal_lkm) |