cmake: no indentation for closing cmake command parenthesis

This commit is contained in:
Anonymous Maarten 2020-12-03 18:11:55 +01:00
parent 9c578580ec
commit 32234609ea
6 changed files with 39 additions and 39 deletions

View File

@ -54,15 +54,15 @@ if(LIBRW_INSTALL)
include(CMakePackageConfigHelpers)
configure_package_config_file(cmake/librw-config.cmake.in librw-config.cmake
INSTALL_DESTINATION "${CMAKE_INSTALL_PREFIX}"
)
)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/librw-config.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)
)
install(
EXPORT librw-targets NAMESPACE librw::
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
)
)
set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A (partial) re-implementation of RenderWare Graphics")
set(CPACK_PACKAGE_VENDOR "aap")

View File

@ -4,22 +4,22 @@ add_library(librw_skeleton
skeleton.cpp
skeleton.h
win.cpp
)
)
set_target_properties(librw_skeleton
PROPERTIES
PREFIX ""
)
)
target_link_libraries(librw_skeleton
PUBLIC
librw
)
)
target_include_directories(librw_skeleton
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
)
if(NOT LIBRW_PLATFORM_PS2 AND NOT LIBRW_PLATFORM_NULL)
add_subdirectory(imgui)
@ -29,13 +29,13 @@ if(LIBRW_INSTALL)
target_include_directories(librw_skeleton
INTERFACE
$<INSTALL_INTERFACE:${LIBRW_INSTALL_INCLUDEDIR}/skeleton>
)
)
install(
FILES
skeleton.h
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/skeleton"
)
)
install(
TARGETS librw_skeleton
@ -43,5 +43,5 @@ if(LIBRW_INSTALL)
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
)
endif()

View File

@ -12,17 +12,17 @@ add_library(librw_skeleton_imgui
stb_rect_pack.h
stb_textedit.h
stb_truetype.h
)
)
set_target_properties(librw_skeleton_imgui
PROPERTIES
PREFIX ""
)
)
target_link_libraries(librw_skeleton_imgui
PUBLIC
librw_skeleton
)
)
if(LIBRW_INSTALL)
install(
@ -34,7 +34,7 @@ if(LIBRW_INSTALL)
ImGuizmo.h
stb_textedit.h
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/skeleton/imgui"
)
)
install(
TARGETS librw_skeleton_imgui
@ -42,5 +42,5 @@ if(LIBRW_INSTALL)
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
)
endif()

View File

@ -91,39 +91,39 @@ add_library(librw
ps2/rwps2.h
ps2/rwps2impl.h
ps2/rwps2plg.h
)
)
add_library(librw::librw ALIAS librw)
target_include_directories(librw
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
)
)
target_compile_definitions(librw
PRIVATE
"$<IF:$<CONFIG:DEBUG>,DEBUG,NDEBUG>"
PUBLIC
"RW_${LIBRW_PLATFORM}"
)
)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
target_compile_options(librw
PRIVATE
"-Wall"
)
)
if (NOT LIBRW_PLATFORM_PS2)
target_compile_options(librw
PRIVATE
"-Wextra"
"-Wdouble-promotion"
"-Wpedantic"
)
)
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(librw
PUBLIC
/wd4996 /wd4244
)
)
endif()
set_target_properties(librw
@ -135,7 +135,7 @@ set_target_properties(librw
CXX_EXTENSIONS OFF
CXX_STANDARD_REQUIRED ON
PREFIX ""
)
)
if(LIBRW_PLATFORM_GL3)
@ -149,7 +149,7 @@ if(LIBRW_PLATFORM_GL3)
PUBLIC
OpenGL::GL
GLEW::GLEW
)
)
if (LIBRW_GL3_GFXLIB STREQUAL "GLFW")
find_package(glfw3 REQUIRED)
target_link_libraries(librw
@ -162,7 +162,7 @@ if(LIBRW_PLATFORM_GL3)
target_link_libraries(librw
PUBLIC
SDL2::SDL2
)
)
endif()
endif()
elseif(LIBRW_PLATFORM_D3D9)
@ -170,21 +170,21 @@ elseif(LIBRW_PLATFORM_D3D9)
PUBLIC
d3d9
xinput
)
)
endif()
if(LIBRW_INSTALL)
target_include_directories(librw
INTERFACE
$<INSTALL_INTERFACE:${LIBRW_INSTALL_INCLUDEDIR}>
)
)
install(
FILES
"${PROJECT_SOURCE_DIR}/args.h"
"${PROJECT_SOURCE_DIR}/rw.h"
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}"
)
)
install(
FILES
base.err
@ -200,7 +200,7 @@ if(LIBRW_INSTALL)
rwplugins.h
rwuserdata.h
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/src"
)
)
install(
FILES
d3d/rwxbox.h
@ -208,20 +208,20 @@ if(LIBRW_INSTALL)
d3d/rwd3d8.h
d3d/rwd3d9.h
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/src/d3d"
)
)
install(
FILES
ps2/rwps2.h
ps2/rwps2plg.h
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/src/ps2"
)
)
install(
FILES
gl/rwwdgl.h
gl/rwgl3.h
gl/rwgl3plg.h
gl/rwgl3shader.h
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/src/gl"
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/src/gl"
)
install(
@ -230,5 +230,5 @@ if(LIBRW_INSTALL)
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
)
endif()

View File

@ -1,14 +1,14 @@
add_executable(dumprwtree
dumprwtree.cpp
)
dumprwtree.cpp
)
target_link_libraries(dumprwtree
PUBLIC
librw
)
)
if(LIBRW_INSTALL)
install(TARGETS dumprwtree
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
)
)
endif()

View File

@ -1,15 +1,15 @@
add_executable(imguitest WIN32
main.cpp
)
)
target_link_libraries(imguitest
PUBLIC
librw
librw_skeleton_imgui
)
)
if(LIBRW_INSTALL)
install(TARGETS imguitest
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
)
)
endif()