1 |
# bin2cpp tool |
2 |
|
3 |
# executable name |
4 |
set(bin2cppName bin2cpp) |
5 |
|
6 |
# Debug - Build |
7 |
if(CMAKE_BUILD_TYPE STREQUAL Debug) |
8 |
# add defines |
9 |
add_definitions(-O2 -s -Wall -fexceptions) |
10 |
endif(CMAKE_BUILD_TYPE STREQUAL Debug) |
11 |
|
12 |
# Devel - Build |
13 |
if(CMAKE_BUILD_TYPE STREQUAL Devel) |
14 |
# add defines |
15 |
add_definitions(-O2 -s -Wall -fexceptions) |
16 |
endif(CMAKE_BUILD_TYPE STREQUAL Devel) |
17 |
|
18 |
# Release - Build |
19 |
if(CMAKE_BUILD_TYPE STREQUAL Release) |
20 |
# add defines |
21 |
add_definitions(-O2 -s -Wall -fexceptions) |
22 |
endif(CMAKE_BUILD_TYPE STREQUAL Release) |
23 |
|
24 |
# variable with all sources of this executable |
25 |
set(bin2cppSources |
26 |
bin2cpp.cpp) |
27 |
|
28 |
set(bin2cppHeaders |
29 |
) |
30 |
|
31 |
# add executable |
32 |
add_executable(${bin2cppName} ${bin2cppSources} ${bin2cppHeaders}) |
33 |
|
34 |
# set output directory |
35 |
set_target_properties(${bin2cppName} PROPERTIES |
36 |
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/tools/bin) |
37 |
|