Added new source files.

This commit is contained in:
Nicolás Ortega Froysa 2018-10-18 12:04:07 +02:00
parent 01a32c0e52
commit 89811c1d02
No known key found for this signature in database
GPG Key ID: FEC70E3BAE2E69BF
3 changed files with 53 additions and 0 deletions

View File

@ -18,6 +18,7 @@ cmake_minimum_required(VERSION 2.6)
project(Indivisible) project(Indivisible)
set(TARGET_NAME indivisible) set(TARGET_NAME indivisible)
set(TARGET_VERSION "v2.0")
if(NOT CMAKE_BUILD_TYPE) if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "release") set(CMAKE_BUILD_TYPE "release")
@ -50,6 +51,8 @@ else()
add_definitions("-DDEBUG") add_definitions("-DDEBUG")
endif() endif()
add_definitions("-DVERSION=\"${TARGET_VERSION}\"")
add_executable(${TARGET_NAME} ${SRCS}) add_executable(${TARGET_NAME} ${SRCS})
target_link_libraries(${TARGET_NAME} target_link_libraries(${TARGET_NAME}

23
src/global.h Normal file
View File

@ -0,0 +1,23 @@
/*
* Copyright (C) 2018 Ortega Froysa, Nicolás <nortega@themusicinnoise.net>
* Author: Ortega Froysa, Nicolás <nortega@themusicinnoise.net>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#pragma once
#ifndef VERSION
# define VERSION "version"
#endif

27
src/main.c Normal file
View File

@ -0,0 +1,27 @@
/*
* Copyright (C) 2018 Ortega Froysa, Nicolás <nortega@themusicinnoise.net>
* Author: Ortega Froysa, Nicolás <nortega@themusicinnoise.net>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include "global.h"
int main(int argc, char *argv[]) {
printf("Indivisible %s\n", VERSION);
return 0;
}