mirror of https://github.com/aap/librw.git
cmake: no indentation for closing cmake command parenthesis
This commit is contained in:
parent
9c578580ec
commit
32234609ea
|
@ -54,15 +54,15 @@ if(LIBRW_INSTALL)
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
configure_package_config_file(cmake/librw-config.cmake.in librw-config.cmake
|
configure_package_config_file(cmake/librw-config.cmake.in librw-config.cmake
|
||||||
INSTALL_DESTINATION "${CMAKE_INSTALL_PREFIX}"
|
INSTALL_DESTINATION "${CMAKE_INSTALL_PREFIX}"
|
||||||
)
|
)
|
||||||
install(
|
install(
|
||||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/librw-config.cmake"
|
FILES "${CMAKE_CURRENT_BINARY_DIR}/librw-config.cmake"
|
||||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
||||||
)
|
)
|
||||||
install(
|
install(
|
||||||
EXPORT librw-targets NAMESPACE librw::
|
EXPORT librw-targets NAMESPACE librw::
|
||||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
||||||
)
|
)
|
||||||
set(CPACK_PACKAGE_NAME "${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_DESCRIPTION_SUMMARY "A (partial) re-implementation of RenderWare Graphics")
|
||||||
set(CPACK_PACKAGE_VENDOR "aap")
|
set(CPACK_PACKAGE_VENDOR "aap")
|
||||||
|
|
|
@ -4,22 +4,22 @@ add_library(librw_skeleton
|
||||||
skeleton.cpp
|
skeleton.cpp
|
||||||
skeleton.h
|
skeleton.h
|
||||||
win.cpp
|
win.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(librw_skeleton
|
set_target_properties(librw_skeleton
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
PREFIX ""
|
PREFIX ""
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(librw_skeleton
|
target_link_libraries(librw_skeleton
|
||||||
PUBLIC
|
PUBLIC
|
||||||
librw
|
librw
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(librw_skeleton
|
target_include_directories(librw_skeleton
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT LIBRW_PLATFORM_PS2 AND NOT LIBRW_PLATFORM_NULL)
|
if(NOT LIBRW_PLATFORM_PS2 AND NOT LIBRW_PLATFORM_NULL)
|
||||||
add_subdirectory(imgui)
|
add_subdirectory(imgui)
|
||||||
|
@ -29,13 +29,13 @@ if(LIBRW_INSTALL)
|
||||||
target_include_directories(librw_skeleton
|
target_include_directories(librw_skeleton
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<INSTALL_INTERFACE:${LIBRW_INSTALL_INCLUDEDIR}/skeleton>
|
$<INSTALL_INTERFACE:${LIBRW_INSTALL_INCLUDEDIR}/skeleton>
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES
|
FILES
|
||||||
skeleton.h
|
skeleton.h
|
||||||
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/skeleton"
|
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/skeleton"
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS librw_skeleton
|
TARGETS librw_skeleton
|
||||||
|
@ -43,5 +43,5 @@ if(LIBRW_INSTALL)
|
||||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -12,17 +12,17 @@ add_library(librw_skeleton_imgui
|
||||||
stb_rect_pack.h
|
stb_rect_pack.h
|
||||||
stb_textedit.h
|
stb_textedit.h
|
||||||
stb_truetype.h
|
stb_truetype.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(librw_skeleton_imgui
|
set_target_properties(librw_skeleton_imgui
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
PREFIX ""
|
PREFIX ""
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(librw_skeleton_imgui
|
target_link_libraries(librw_skeleton_imgui
|
||||||
PUBLIC
|
PUBLIC
|
||||||
librw_skeleton
|
librw_skeleton
|
||||||
)
|
)
|
||||||
|
|
||||||
if(LIBRW_INSTALL)
|
if(LIBRW_INSTALL)
|
||||||
install(
|
install(
|
||||||
|
@ -34,7 +34,7 @@ if(LIBRW_INSTALL)
|
||||||
ImGuizmo.h
|
ImGuizmo.h
|
||||||
stb_textedit.h
|
stb_textedit.h
|
||||||
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/skeleton/imgui"
|
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/skeleton/imgui"
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS librw_skeleton_imgui
|
TARGETS librw_skeleton_imgui
|
||||||
|
@ -42,5 +42,5 @@ if(LIBRW_INSTALL)
|
||||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -91,39 +91,39 @@ add_library(librw
|
||||||
ps2/rwps2.h
|
ps2/rwps2.h
|
||||||
ps2/rwps2impl.h
|
ps2/rwps2impl.h
|
||||||
ps2/rwps2plg.h
|
ps2/rwps2plg.h
|
||||||
)
|
)
|
||||||
add_library(librw::librw ALIAS librw)
|
add_library(librw::librw ALIAS librw)
|
||||||
|
|
||||||
target_include_directories(librw
|
target_include_directories(librw
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
|
||||||
)
|
)
|
||||||
|
|
||||||
target_compile_definitions(librw
|
target_compile_definitions(librw
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"$<IF:$<CONFIG:DEBUG>,DEBUG,NDEBUG>"
|
"$<IF:$<CONFIG:DEBUG>,DEBUG,NDEBUG>"
|
||||||
PUBLIC
|
PUBLIC
|
||||||
"RW_${LIBRW_PLATFORM}"
|
"RW_${LIBRW_PLATFORM}"
|
||||||
)
|
)
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
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
|
target_compile_options(librw
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"-Wall"
|
"-Wall"
|
||||||
)
|
)
|
||||||
if (NOT LIBRW_PLATFORM_PS2)
|
if (NOT LIBRW_PLATFORM_PS2)
|
||||||
target_compile_options(librw
|
target_compile_options(librw
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"-Wextra"
|
"-Wextra"
|
||||||
"-Wdouble-promotion"
|
"-Wdouble-promotion"
|
||||||
"-Wpedantic"
|
"-Wpedantic"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
target_compile_options(librw
|
target_compile_options(librw
|
||||||
PUBLIC
|
PUBLIC
|
||||||
/wd4996 /wd4244
|
/wd4996 /wd4244
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties(librw
|
set_target_properties(librw
|
||||||
|
@ -135,7 +135,7 @@ set_target_properties(librw
|
||||||
CXX_EXTENSIONS OFF
|
CXX_EXTENSIONS OFF
|
||||||
CXX_STANDARD_REQUIRED ON
|
CXX_STANDARD_REQUIRED ON
|
||||||
PREFIX ""
|
PREFIX ""
|
||||||
)
|
)
|
||||||
|
|
||||||
if(LIBRW_PLATFORM_GL3)
|
if(LIBRW_PLATFORM_GL3)
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ if(LIBRW_PLATFORM_GL3)
|
||||||
PUBLIC
|
PUBLIC
|
||||||
OpenGL::GL
|
OpenGL::GL
|
||||||
GLEW::GLEW
|
GLEW::GLEW
|
||||||
)
|
)
|
||||||
if (LIBRW_GL3_GFXLIB STREQUAL "GLFW")
|
if (LIBRW_GL3_GFXLIB STREQUAL "GLFW")
|
||||||
find_package(glfw3 REQUIRED)
|
find_package(glfw3 REQUIRED)
|
||||||
target_link_libraries(librw
|
target_link_libraries(librw
|
||||||
|
@ -162,7 +162,7 @@ if(LIBRW_PLATFORM_GL3)
|
||||||
target_link_libraries(librw
|
target_link_libraries(librw
|
||||||
PUBLIC
|
PUBLIC
|
||||||
SDL2::SDL2
|
SDL2::SDL2
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
elseif(LIBRW_PLATFORM_D3D9)
|
elseif(LIBRW_PLATFORM_D3D9)
|
||||||
|
@ -170,21 +170,21 @@ elseif(LIBRW_PLATFORM_D3D9)
|
||||||
PUBLIC
|
PUBLIC
|
||||||
d3d9
|
d3d9
|
||||||
xinput
|
xinput
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LIBRW_INSTALL)
|
if(LIBRW_INSTALL)
|
||||||
target_include_directories(librw
|
target_include_directories(librw
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<INSTALL_INTERFACE:${LIBRW_INSTALL_INCLUDEDIR}>
|
$<INSTALL_INTERFACE:${LIBRW_INSTALL_INCLUDEDIR}>
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES
|
FILES
|
||||||
"${PROJECT_SOURCE_DIR}/args.h"
|
"${PROJECT_SOURCE_DIR}/args.h"
|
||||||
"${PROJECT_SOURCE_DIR}/rw.h"
|
"${PROJECT_SOURCE_DIR}/rw.h"
|
||||||
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}"
|
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}"
|
||||||
)
|
)
|
||||||
install(
|
install(
|
||||||
FILES
|
FILES
|
||||||
base.err
|
base.err
|
||||||
|
@ -200,7 +200,7 @@ if(LIBRW_INSTALL)
|
||||||
rwplugins.h
|
rwplugins.h
|
||||||
rwuserdata.h
|
rwuserdata.h
|
||||||
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/src"
|
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/src"
|
||||||
)
|
)
|
||||||
install(
|
install(
|
||||||
FILES
|
FILES
|
||||||
d3d/rwxbox.h
|
d3d/rwxbox.h
|
||||||
|
@ -208,20 +208,20 @@ if(LIBRW_INSTALL)
|
||||||
d3d/rwd3d8.h
|
d3d/rwd3d8.h
|
||||||
d3d/rwd3d9.h
|
d3d/rwd3d9.h
|
||||||
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/src/d3d"
|
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/src/d3d"
|
||||||
)
|
)
|
||||||
install(
|
install(
|
||||||
FILES
|
FILES
|
||||||
ps2/rwps2.h
|
ps2/rwps2.h
|
||||||
ps2/rwps2plg.h
|
ps2/rwps2plg.h
|
||||||
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/src/ps2"
|
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/src/ps2"
|
||||||
)
|
)
|
||||||
install(
|
install(
|
||||||
FILES
|
FILES
|
||||||
gl/rwwdgl.h
|
gl/rwwdgl.h
|
||||||
gl/rwgl3.h
|
gl/rwgl3.h
|
||||||
gl/rwgl3plg.h
|
gl/rwgl3plg.h
|
||||||
gl/rwgl3shader.h
|
gl/rwgl3shader.h
|
||||||
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/src/gl"
|
DESTINATION "${LIBRW_INSTALL_INCLUDEDIR}/src/gl"
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
|
@ -230,5 +230,5 @@ if(LIBRW_INSTALL)
|
||||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
add_executable(dumprwtree
|
add_executable(dumprwtree
|
||||||
dumprwtree.cpp
|
dumprwtree.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(dumprwtree
|
target_link_libraries(dumprwtree
|
||||||
PUBLIC
|
PUBLIC
|
||||||
librw
|
librw
|
||||||
)
|
)
|
||||||
|
|
||||||
if(LIBRW_INSTALL)
|
if(LIBRW_INSTALL)
|
||||||
install(TARGETS dumprwtree
|
install(TARGETS dumprwtree
|
||||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
add_executable(imguitest WIN32
|
add_executable(imguitest WIN32
|
||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(imguitest
|
target_link_libraries(imguitest
|
||||||
PUBLIC
|
PUBLIC
|
||||||
librw
|
librw
|
||||||
librw_skeleton_imgui
|
librw_skeleton_imgui
|
||||||
)
|
)
|
||||||
|
|
||||||
if(LIBRW_INSTALL)
|
if(LIBRW_INSTALL)
|
||||||
install(TARGETS imguitest
|
install(TARGETS imguitest
|
||||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue