Browse Source

Add build tools

master
Jake Wakeling 5 months ago
parent
commit
d059baec0c
2 changed files with 36 additions and 0 deletions
  1. 33
    0
      CMakeLists.txt
  2. 3
    0
      build/CMAKE_WIN64.bat

+ 33
- 0
CMakeLists.txt View File

@@ -0,0 +1,33 @@
# CMakeLists.txt
# CMakeLists file for B64

cmake_minimum_required(VERSION 3.9) # CMake Minimum Required Version
project(B64) # Project
set(CMAKE_C_STANDARD 11) # C Standard

# Output Directories
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)

link_directories( # Library Directories
/lib/x64/
C:/Libraries/x64/
)

file(GLOB SOURCES src/* include/*) # Add Source Files
add_executable(b64 ${SOURCES}) # Build Target

target_include_directories(b64 PUBLIC # Target Include Directories
/include/
C:/Include/
)

target_link_libraries(b64 # Target Libraries
getopt
)

set_property( # Visual Studio Startup Project
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
PROPERTY VS_STARTUP_PROJECT b64
)

+ 3
- 0
build/CMAKE_WIN64.bat View File

@@ -0,0 +1,3 @@
@echo off
cmake ../ -DCMAKE_GENERATOR_PLATFORM=x64
cmake --build . --config Release

Loading…
Cancel
Save