author | Slion |
Wed, 06 Jan 2010 20:35:57 +0100 | |
branch | anywhere |
changeset 24 | 18d195b75193 |
parent 23 | 9c130f173b89 |
child 25 | 57330c35d3d7 |
permissions | -rw-r--r-- |
24
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
1 |
# Copyright (c) 2009-2010 Stéphane Lenclud. |
18 | 2 |
# All rights reserved. |
3 |
# This component and the accompanying materials are made available |
|
4 |
# under the terms of the License "Eclipse Public License v1.0" |
|
5 |
# which accompanies this distribution, and is available |
|
6 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 |
# |
|
8 |
# Initial Contributors: |
|
9 |
# Stéphane Lenclud. |
|
10 |
# |
|
11 |
||
12 |
project (eka) |
|
13 |
||
14 |
cmake_minimum_required(VERSION 2.6) |
|
15 |
||
19
f6d3d9676ee4
Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents:
18
diff
changeset
|
16 |
|
21
af091391d962
Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents:
19
diff
changeset
|
17 |
#Generate the exec enum using CMAKE custom command |
19
f6d3d9676ee4
Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents:
18
diff
changeset
|
18 |
#perl genexec.pl -i execs.txt -e ../include/exec_enum.h -u ../include/exec_user.h -k ../include/exec_kernel.h |
21
af091391d962
Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents:
19
diff
changeset
|
19 |
add_custom_command ( |
24
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
20 |
OUTPUT ./include/exec_enum.h ./include/exec_user.h ./include/kernel/exec_kernel.h |
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
21 |
COMMAND perl ./kernel/genexec.pl -i ./kernel/execs.txt -e ./include/exec_enum.h -u ./include/exec_user.h -k ./include/kernel/exec_kernel.h |
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
22 |
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} |
21
af091391d962
Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents:
19
diff
changeset
|
23 |
COMMENT "Generating exec headers..." |
af091391d962
Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents:
19
diff
changeset
|
24 |
VERBATIM |
af091391d962
Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents:
19
diff
changeset
|
25 |
) |
24
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
26 |
|
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
27 |
#Tell cmake those file won't be available until build time |
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
28 |
set_source_files_properties(./include/exec_enum.h PROPERTIES GENERATED 1) |
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
29 |
set_source_files_properties(./include/exec_user.h PROPERTIES GENERATED 1) |
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
30 |
set_source_files_properties(./include/kernel/exec_kernel.h PROPERTIES GENERATED 1) |
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
31 |
|
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
32 |
#Custom target that will generate our exec headers |
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
33 |
add_custom_target(genexec DEPENDS ./include/exec_enum.h ./include/exec_user.h ./include/kernel/exec_kernel.h) |
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
34 |
|
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
35 |
add_subdirectory(./euser ./euser/bin) |
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
36 |
add_subdirectory(./kernel ./kernel/bin) |
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
37 |
|
18d195b75193
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
23
diff
changeset
|
38 |