forked from robert1207/morse_encode
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
project(morse-encode-and-decode) | ||
|
||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_C_FLAGS, "-Wall") | ||
|
||
if(CMAKE_CONFIGURATION_TYPES) | ||
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "My multi config types" FORCE) | ||
elseif(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) | ||
set(CMAKE_BUILD_TYPE RELEASE) | ||
endif() | ||
|
||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src) | ||
file(GLOB SRCS "src/*.c" "src/*.h") | ||
add_executable(${PROJECT_NAME} ${SRCS}) | ||
|
||
if(UNIX) | ||
set(CMAKE_INSTALL_PREFIX /usr/local) | ||
install(TARGETS ${PROJECT_NAME} DESTINATION bin) | ||
elseif(WIN32) | ||
set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/") | ||
install(TARGETS ${PROJECT_NAME} DESTINATION bin) | ||
endif() |