diff --git a/CMakeLists.txt b/CMakeLists.txt index 9773b7b..9f80a4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,7 @@ cmake_minimum_required(VERSION 2.6) project(Indivisible) set(TARGET_NAME indivisible) +set(TARGET_VERSION "v2.0") if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "release") @@ -50,6 +51,8 @@ else() add_definitions("-DDEBUG") endif() +add_definitions("-DVERSION=\"${TARGET_VERSION}\"") + add_executable(${TARGET_NAME} ${SRCS}) target_link_libraries(${TARGET_NAME} diff --git a/src/global.h b/src/global.h new file mode 100644 index 0000000..f810f65 --- /dev/null +++ b/src/global.h @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2018 Ortega Froysa, Nicolás + * Author: Ortega Froysa, Nicolás + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifndef VERSION +# define VERSION "version" +#endif diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..ed05a94 --- /dev/null +++ b/src/main.c @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2018 Ortega Froysa, Nicolás + * Author: Ortega Froysa, Nicolás + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include + +#include "global.h" + +int main(int argc, char *argv[]) { + printf("Indivisible %s\n", VERSION); + + return 0; +}