- CMakeLists.txt fixes

Corrected some typos in the file.
This commit is contained in:
sinisterseed 2020-09-22 14:00:13 +02:00 committed by Christoph Oelckers
parent 2a2209b085
commit 0aa6b99287
2 changed files with 14 additions and 14 deletions

View file

@ -59,13 +59,13 @@ function( add_pk3 PK3_NAME PK3_DIR )
string( REPLACE "." "_" PK3_TARGET ${PK3_NAME} )
if( NOT COMPILE_OUTPUT_OLDSTYLE )
add_custom_command( OUTPUT ${COMPILE_OUTPUT_DIECTRORY}/${PK3_NAME}
COMMAND zipdir -udf ${PK3_ZIPDIR_OPTIONS} ${COMPILE_OUTPUT_DIECTRORY}/${PK3_NAME} ${PK3_DIR}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${COMPILE_OUTPUT_DIECTRORY}/${PK3_NAME} $<TARGET_FILE_DIR:${PROJECT_NAME}>/${PK3_NAME}
add_custom_command( OUTPUT ${COMPILE_OUTPUT_DIRECTORY}/${PK3_NAME}
COMMAND zipdir -udf ${PK3_ZIPDIR_OPTIONS} ${COMPILE_OUTPUT_DIRECTORY}/${PK3_NAME} ${PK3_DIR}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${COMPILE_OUTPUT_DIRECTORY}/${PK3_NAME} $<TARGET_FILE_DIR:${PROJECT_NAME}>/${PK3_NAME}
DEPENDS zipdir )
else()
add_custom_command( OUTPUT ${COMPILE_OUTPUT_DIECTRORY}/${PK3_NAME}
COMMAND zipdir -udf ${PK3_ZIPDIR_OPTIONS} ${COMPILE_OUTPUT_DIECTRORY}/${PK3_NAME} ${PK3_DIR}
add_custom_command( OUTPUT ${COMPILE_OUTPUT_DIRECTORY}/${PK3_NAME}
COMMAND zipdir -udf ${PK3_ZIPDIR_OPTIONS} ${COMPILE_OUTPUT_DIRECTORY}/${PK3_NAME} ${PK3_DIR}
DEPENDS zipdir )
endif()
# Create a list of source files for this PK3, for use in the IDE
@ -91,7 +91,7 @@ function( add_pk3 PK3_NAME PK3_DIR )
# rebuild each time since their dependency has "changed."
add_custom_target( ${PK3_TARGET} ALL
COMMAND ${CMAKE_COMMAND} -E touch $<TARGET_FILE:zipdir>
DEPENDS ${COMPILE_OUTPUT_DIECTRORY}/${PK3_NAME}
DEPENDS ${COMPILE_OUTPUT_DIRECTORY}/${PK3_NAME}
SOURCES ${PK3_SRCS})
# Phase 3: Assign source files to a nice folder structure in the IDE
assort_pk3_source_folder("Source Files" ${PK3_DIR})
@ -122,10 +122,10 @@ IF( NOT CMAKE_BUILD_TYPE )
FORCE )
ENDIF()
set( COMPILE_OUTPUT_DIECTRORY ${CMAKE_BINARY_DIR} CACHE PATH "Directory where engine data and the executable will be created." )
set( COMPILE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} CACHE PATH "Directory where engine data and the executable will be created." )
set( COMPILE_EXE_NAME ${PROJECT_NAME} CACHE FILEPATH "Name of the executable to create" )
if( MSVC )
# Allow the user to use COMPILE_OUTPUT_DIECTRORY as a single release point.
# Allow the user to use COMPILE_OUTPUT_DIRECTORY as a single release point.
# Use different names for the various compile targets.
option( COMPILE_OUTPUT_OLDSTYLE "Don't use Release/Debug directories." OFF )
else()

View file

@ -1129,18 +1129,18 @@ add_dependencies( ${PROJECT_NAME} revision_check )
if( NOT COMPILE_OUTPUT_OLDSTYLE )
# RUNTIME_OUTPUT_DIRECTORY does not exist in CMake 2.4.
# Linux distributions are slow to adopt 2.6. :(
set_target_properties( ${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${COMPILE_OUTPUT_DIECTRORY} )
set_target_properties( ${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${COMPILE_OUTPUT_DIRECTORY} )
set_target_properties( ${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${PROJECT_NAME} )
else()
set_target_properties( ${PROJECT_NAME} PROPERTIES
RUNTIME_OUTPUT_NAME ${PROJECT_NAME}
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${COMPILE_OUTPUT_DIECTRORY}
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${COMPILE_OUTPUT_DIRECTORY}
RUNTIME_OUTPUT_NAME_DEBUG ${PROJECT_NAME}d
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${COMPILE_OUTPUT_DIECTRORY}
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${COMPILE_OUTPUT_DIRECTORY}
RUNTIME_OUTPUT_NAME_MINSIZEREL ${PROJECT_NAME}msr
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${COMPILE_OUTPUT_DIECTRORY}
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${COMPILE_OUTPUT_DIRECTORY}
RUNTIME_OUTPUT_NAME_RELWITHDEBINFO ${PROJECT_NAME}rd
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${COMPILE_OUTPUT_DIECTRORY}
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${COMPILE_OUTPUT_DIRECTORY}
)
endif()
@ -1161,7 +1161,7 @@ if( MSVC )
endif()
if( NOT WIN32 AND NOT APPLE )
FILE( WRITE ${CMAKE_CURRENT_BINARY_DIR}/link-make "if [ ! -e ${COMPILE_OUTPUT_DIECTRORY}/${PROJECT_NAME} ]; then ln -sf ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME} ${COMPILE_OUTPUT_DIECTRORY}/${PROJECT_NAME}; fi" )
FILE( WRITE ${CMAKE_CURRENT_BINARY_DIR}/link-make "if [ ! -e ${COMPILE_OUTPUT_DIRECTORY}/${PROJECT_NAME} ]; then ln -sf ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME} ${COMPILE_OUTPUT_DIRECTORY}/${PROJECT_NAME}; fi" )
add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/link-make
COMMAND /bin/sh -c ${CMAKE_CURRENT_BINARY_DIR}/link-make )