CMakeList.txt refactoring to make it more readable. (0.37.34)
This commit is contained in:
parent
e6b9bd7488
commit
e144b5119d
1 changed files with 123 additions and 119 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
project(fun VERSION 0.37.33 LANGUAGES C)
|
project(fun VERSION 0.37.34 LANGUAGES C)
|
||||||
|
|
||||||
set(CMAKE_C_STANDARD 99)
|
set(CMAKE_C_STANDARD 99)
|
||||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||||
|
|
@ -515,7 +515,7 @@ if(FUN_WITH_REPL)
|
||||||
DEPENDS fun
|
DEPENDS fun
|
||||||
USES_TERMINAL
|
USES_TERMINAL
|
||||||
COMMENT "Run Fun REPL"
|
COMMENT "Run Fun REPL"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_custom_target(run
|
add_custom_target(run
|
||||||
|
|
@ -726,7 +726,7 @@ message(STATUS \"Uninstall finished. Removed \${_removed} files and \${_removed_
|
||||||
-P "${_FUN_UNINSTALL_SCRIPT}"
|
-P "${_FUN_UNINSTALL_SCRIPT}"
|
||||||
USES_TERMINAL
|
USES_TERMINAL
|
||||||
COMMENT "Uninstall files installed by this project (use sudo if needed)"
|
COMMENT "Uninstall files installed by this project (use sudo if needed)"
|
||||||
)
|
)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# Define the uninstall target
|
# Define the uninstall target
|
||||||
|
|
@ -735,21 +735,25 @@ fun_add_uninstall_target()
|
||||||
# Install rules
|
# Install rules
|
||||||
# Binary
|
# Binary
|
||||||
install(TARGETS fun
|
install(TARGETS fun
|
||||||
RUNTIME DESTINATION /usr/bin)
|
RUNTIME DESTINATION /usr/bin
|
||||||
|
)
|
||||||
|
|
||||||
# Libs
|
# Libs
|
||||||
install(DIRECTORY lib/
|
install(DIRECTORY lib/
|
||||||
DESTINATION /usr/share/fun/lib
|
DESTINATION /usr/share/fun/lib
|
||||||
FILES_MATCHING PATTERN "*.fun")
|
FILES_MATCHING PATTERN "*.fun"
|
||||||
|
)
|
||||||
|
|
||||||
# Optionally install example scripts
|
# Optionally install example scripts
|
||||||
option(FUN_INSTALL_EXAMPLES "Install example .fun scripts" ON)
|
option(FUN_INSTALL_EXAMPLES "Install example .fun scripts" ON)
|
||||||
if(FUN_INSTALL_EXAMPLES)
|
if(FUN_INSTALL_EXAMPLES)
|
||||||
install(DIRECTORY examples/
|
install(DIRECTORY examples/
|
||||||
DESTINATION /usr/share/fun/examples
|
DESTINATION /usr/share/fun/examples
|
||||||
FILES_MATCHING PATTERN "*.fun")
|
FILES_MATCHING PATTERN "*.fun"
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# - Docs
|
# - Docs
|
||||||
install(FILES README.md LICENSE
|
install(FILES README.md LICENSE
|
||||||
DESTINATION /usr/share/doc/fun)
|
DESTINATION /usr/share/doc/fun
|
||||||
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue