os/boardsupport/emulator/emulatorbsp/ecust.cmake
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
child 1 260cb5ec6c19
permissions -rw-r--r--
First public contribution.
     1 # Copyright (c) 2009-2012 Stéphane Lenclud.
     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 push_target(ecust)
    13 
    14 #Add current file to our source tree
    15 add_cmake_source()
    16 #Make sure all the output from all projects will go in one place
    17 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../bin)
    18 
    19 
    20 include_directories(./inc)
    21 include_directories(../../../kernelhwsrv/kernel/eka/include/kernel/win32)
    22 include_directories(../../../kernelhwsrv/kernel/eka/include/memmodel/emul)
    23 include_directories(../../../kernelhwsrv/kernel/eka/include)
    24 include_directories(../../../kernelhwsrv/kernel/eka/include/nkern)
    25 include_directories(../../../kernelhwsrv/kernel/eka/include/nkern/win32)
    26 
    27 
    28 #Hoping we include the right entry point
    29 set (sourcepath ../../../kernelhwsrv/kernel/eka/kernel/win32/)
    30 add_source(v_entry.cpp)
    31 
    32 set (sourcepath ../../../kernelhwsrv/kernel/eka/drivers/power/binary/)
    33 add_source(
    34 bpower.cpp
    35 )
    36 
    37 set (sourcepath ./specific/)
    38 add_source(
    39 variant.cpp timer.cpp property.cpp
    40 )
    41 
    42 #Hoping we include the right entry point
    43 set (sourcepath ./bwins/)
    44 add_source(vwinsu.def)
    45 
    46 get_source(source)
    47 add_library (ecust SHARED ${source})
    48 target_link_libraries(ecust emulator ekern)
    49 #WIN32 libraries
    50 target_link_libraries(ecust kernel32 user32 winmm)
    51 #
    52 add_define(__EXPORT_MEMCPY__)				
    53 add_define(__IN_KERNEL__)
    54 add_define(__KERNEL_MODE__)
    55 add_define(__MEMMODEL_EMUL_SINGLE_HOST_PROCESS__)
    56 
    57 
    58 #Create our data directory for the emulator
    59 #See 
    60 #file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/\${BUILD_TYPE}/data)				
    61 #execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${BUILD_TYPE}/data)
    62 
    63 #add_custom_command (
    64 # 	TARGET ecust
    65 #   	PRE_BUILD
    66 #   	COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}${CMAKE_CFG_INTDIR}/data
    67 # 	)
    68 
    69 
    70 add_custom_target (
    71 	createEmuDataFolder
    72    	COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/data
    73  	)
    74 
    75 pop_target(ecust)