-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from ShFil119/cmake
Add cmake config file
- Loading branch information
Showing
15 changed files
with
688 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}") | ||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A (partial) re-implementation of RenderWare Graphics") | ||
set(CPACK_PACKAGE_VENDOR "librw") | ||
|
||
# FIXME: better description of the project | ||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/LICENSE") | ||
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") | ||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}") | ||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}") | ||
|
||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}") | ||
|
||
# set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_CURRENT_SOURCE_DIR}/CMakeCPackOptions.cmake") | ||
|
||
include(CPack) |
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,57 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
|
||
project(librw C CXX) | ||
|
||
if(PS2DEV AND EE) | ||
include("${CMAKE_CURRENT_LIST_DIR}/cmake/ee.cmake") | ||
endif() | ||
|
||
if(WIN32) | ||
set(LIBRW_PLATFORMS "NULL" "GL3" "D3D9") | ||
else() | ||
set(LIBRW_PLATFORMS "NULL" "GL3" "PS2") | ||
endif() | ||
set(LIBRW_PLATFORM "NULL" CACHE STRING "Platform") | ||
set_property(CACHE LIBRW_PLATFORM PROPERTY STRINGS ${LIBRW_PLATFORMS}) | ||
message(STATUS "LIBRW_PLATFORM = ${LIBRW_PLATFORM} (choices=${LIBRW_PLATFORMS})") | ||
set("LIBRW_PLATFORM_${LIBRW_PLATFORM}" ON) | ||
if(NOT LIBRW_PLATFORM IN_LIST LIBRW_PLATFORMS) | ||
message(FATAL_ERROR "Illegal LIBRW_PLATFORM=${LIBRW_PLATFORM}") | ||
endif() | ||
|
||
if(LIBRW_PLATFORM_PS2) | ||
enable_language(DSM) | ||
endif() | ||
|
||
option(LIBRW_TOOLS "Build librw tools" ON) | ||
option(LIBRW_INSTALL "Install librw files" OFF) | ||
|
||
if(LIBRW_INSTALL) | ||
include(GNUInstallDirs) | ||
set(LIBRW_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/librw") | ||
endif() | ||
|
||
add_subdirectory(src) | ||
|
||
if(LIBRW_TOOLS) | ||
add_subdirectory(skeleton) | ||
|
||
add_subdirectory(tools) | ||
endif() | ||
|
||
if(LIBRW_INSTALL) | ||
include(CMakePackageConfigHelpers) | ||
configure_package_config_file(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 | ||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" | ||
) | ||
|
||
include(CMakeCPack.cmake) | ||
endif() |
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,16 @@ | ||
set(CMAKE_DSM_COMPILER "@_CMAKE_DSM_COMPILER@") | ||
set(CMAKE_DSM_COMPILER_ARG1 "@_CMAKE_DSM_COMPILER_ARG1@") | ||
set(CMAKE_DSM_COMPILER_AR "@_CMAKE_DSM_COMPILER_AR@") | ||
set(CMAKE_RANLIB "@CMAKE_RANLIB@") | ||
set(CMAKE_DSM_COMPILER_RANLIB "@_CMAKE_DSM_COMPILER_RANLIB@") | ||
set(CMAKE_LINKER "@CMAKE_LINKER@") | ||
set(CMAKE_DSM_COMPILER_LOADED 1) | ||
set(CMAKE_DSM_COMPILER_ID "@_CMAKE_DSM_COMPILER_ID@") | ||
set(CMAKE_DSM_COMPILER_VERSION "@_CMAKE_DSM_COMPILER_VERSION@") | ||
set(CMAKE_DSM_COMPILER_ENV_VAR "@_CMAKE_DSM_COMPILER_ENV_VAR@") | ||
@_SET_CMAKE_DSM_COMPILER_ARCHITECTURE_ID@ | ||
|
||
set(CMAKE_DSM_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) | ||
set(CMAKE_DSM_LINKER_PREFERENCE 0) | ||
|
||
@CMAKE_DSM_COMPILER_CUSTOM_CODE@ |
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,79 @@ | ||
if(UNIX) | ||
set(CMAKE_DSM_OUTPUT_EXTENSION .o) | ||
else() | ||
set(CMAKE_DSM_OUTPUT_EXTENSION .obj) | ||
endif() | ||
|
||
set(CMAKE_INCLUDE_FLAG_DSM "-I") | ||
|
||
set(CMAKE_DSM_FLAGS_INIT "$ENV{DSMFLAGS} ${CMAKE_DSM_FLAGS_INIT}") | ||
|
||
# replace for CMake >= 3.11 | ||
foreach(c "" _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO) | ||
string(STRIP "${CMAKE_DSM_FLAGS${c}_INIT}" CMAKE_DSM_FLAGS${c}_INIT) | ||
endforeach() | ||
|
||
set (CMAKE_DSM_FLAGS "${CMAKE_DSM_FLAGS_INIT}" CACHE STRING | ||
"Flags used by the assembler during all build types.") | ||
|
||
if(NOT CMAKE_NOT_USING_CONFIG_FLAGS) | ||
get_property(_GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) | ||
# default build type is none | ||
if(NOT _GENERATOR_IS_MULTI_CONFIG AND NOT CMAKE_NO_BUILD_TYPE) | ||
set (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING | ||
"Choose the type of build, options are: None, Debug Release RelWithDebInfo MinSizeRel.") | ||
endif() | ||
unset(_GENERATOR_IS_MULTI_CONFIG) | ||
set (CMAKE_DSM_FLAGS_DEBUG "${CMAKE_DSM_FLAGS_DEBUG_INIT}" CACHE STRING | ||
"Flags used by the assembler during debug builds.") | ||
set (CMAKE_DSM_FLAGS_MINSIZEREL "${CMAKE_DSM_FLAGS_MINSIZEREL_INIT}" CACHE STRING | ||
"Flags used by the assembler during release minsize builds.") | ||
set (CMAKE_DSM_FLAGS_RELEASE "${CMAKE_DSM_FLAGS_RELEASE_INIT}" CACHE STRING | ||
"Flags used by the assembler during release builds.") | ||
set (CMAKE_DSM_FLAGS_RELWITHDEBINFO "${CMAKE_DSM_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING | ||
"Flags used by the assembler during Release with Debug Info builds.") | ||
endif() | ||
|
||
mark_as_advanced(CMAKE_DSM_FLAGS | ||
CMAKE_DSM_FLAGS_DEBUG | ||
CMAKE_DSM_FLAGS_MINSIZEREL | ||
CMAKE_DSM_FLAGS_RELEASE | ||
CMAKE_DSM_FLAGS_RELWITHDEBINFO | ||
) | ||
# WITH: cmake_initialize_per_config_variable(CMAKE_DSM_FLAGS "Flags used by the DSM compiler") | ||
|
||
if(NOT CMAKE_DSM_COMPILE_OBJECT) | ||
set(CMAKE_DSM_COMPILE_OBJECT "<CMAKE_DSM_COMPILER> <INCLUDES> <FLAGS> -o <OBJECT> <SOURCE>") | ||
endif() | ||
|
||
if(NOT CMAKE_DSM_CREATE_STATIC_LIBRARY) | ||
set(CMAKE_DSM_CREATE_STATIC_LIBRARY | ||
"<CMAKE_DSM_COMPILER_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> " | ||
"<CMAKE_DSM_COMPILER_RANLIB> <TARGET>") | ||
endif() | ||
|
||
if(NOT CMAKE_DSM_LINK_EXECUTABLE) | ||
set(CMAKE_DSM_LINK_EXECUTABLE | ||
"<CMAKE_DSM_COMPILER> <FLAGS> <CMAKE_DSM_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>") | ||
endif() | ||
|
||
if(NOT CMAKE_EXECUTABLE_RUNTIME_DSM_FLAG) | ||
set(CMAKE_EXECUTABLE_RUNTIME_DSM_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_DSM_FLAG}) | ||
endif() | ||
|
||
if(NOT CMAKE_EXECUTABLE_RUNTIME_DSM_FLAG_SEP) | ||
set(CMAKE_EXECUTABLE_RUNTIME_DSM_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_DSM_FLAG_SEP}) | ||
endif() | ||
|
||
if(NOT CMAKE_EXECUTABLE_RPATH_LINK_DSM_FLAG) | ||
set(CMAKE_EXECUTABLE_RPATH_LINK_DSM_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_DSM_FLAG}) | ||
endif() | ||
|
||
# to be done | ||
if(NOT CMAKE_DSM_CREATE_SHARED_LIBRARY) | ||
set(CMAKE_DSM_CREATE_SHARED_LIBRARY) | ||
endif() | ||
|
||
if(NOT CMAKE_DSM_CREATE_SHARED_MODULE) | ||
set(CMAKE_DSM_CREATE_SHARED_MODULE) | ||
endif() |
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,87 @@ | ||
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake) | ||
|
||
if (NOT CMAKE_DSM_COMPILER) | ||
message(FATAL_ERROR "Need CMAKE_DSM_COMPILER set") | ||
endif() | ||
|
||
_cmake_find_compiler_path(DSM) | ||
mark_as_advanced(CMAKE_DSM_COMPILER) | ||
|
||
if (NOT CMAKE_DSM_COMPILER_ID) | ||
# Table of per-vendor compiler id flags with expected output. | ||
list(APPEND CMAKE_DSM_COMPILER_ID_VENDORS GNU ) | ||
set(CMAKE_DSM_COMPILER_ID_VENDOR_FLAGS_GNU "--version") | ||
set(CMAKE_DSM_COMPILER_ID_VENDOR_REGEX_GNU "(GNU assembler)|(GCC)|(Free Software Foundation)") | ||
|
||
include(CMakeDetermineCompilerId) | ||
cmake_determine_compiler_id_vendor(DSM "") | ||
|
||
endif() | ||
|
||
if (NOT _CMAKE_TOOLCHAIN_LOCATION) | ||
get_filename_component(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_DSM_COMPILER}" PATH) | ||
endif() | ||
|
||
if (CMAKE_DSM_COMPILER_ID) | ||
if (CMAKE_DSM_COMPILER_VERSION) | ||
set(_version " ${CMAKE_DSM_COMPILER_VERSION}") | ||
else() | ||
set(_version "") | ||
endif() | ||
message(STATUS "The DSM compiler identification is ${CMAKE_DSM_COMPILER_ID}${_version}") | ||
unset(_version) | ||
else() | ||
message(STATUS "The DSM compiler identification is unknown") | ||
endif() | ||
|
||
if (NOT _CMAKE_TOOLCHAIN_PREFIX) | ||
get_filename_component(COMPILER_BASENAME "${CMAKE_DSM_COMPILER}" NAME) | ||
if (COMPILER_BASENAME MATCHES "^(.+1)g?as(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$") | ||
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1}) | ||
endif() | ||
|
||
endif() | ||
|
||
set(_CMAKE_PROCESSING_LANGUAGE "DSM") | ||
find_program(CMAKE_DSM_COMPILER_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) | ||
find_program(CMAKE_DSM_COMPILER_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) | ||
find_program(CMAKE_DSM_COMPILER_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) | ||
find_program(CMAKE_DSM_COMPILER_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) | ||
find_program(CMAKE_DSM_COMPILER_OBJDUMP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objdump HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) | ||
find_program(CMAKE_DSM_COMPILER_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) | ||
|
||
unset(_CMAKE_PROCESSING_LANGUAGE) | ||
|
||
set(CMAKE_DSM_COMPILER_ENV_VAR "DSM") | ||
|
||
if (CMAKE_DSM_COMPILER) | ||
message(STATUS "Found DSM assembler: ${CMAKE_DSM_COMPILER}") | ||
else() | ||
message(STATUS "Didn't find assembler") | ||
endif() | ||
|
||
foreach(_var | ||
COMPILER | ||
COMPILER_ID | ||
COMPILER_ARG1 | ||
COMPILER_ENV_VAR | ||
COMPILER_AR | ||
COMPILER_RANLIB | ||
COMPILER_VERSION | ||
) | ||
set(_CMAKE_DSM_${_var} "${CMAKE_DSM_${_var}}") | ||
endforeach() | ||
|
||
configure_file("${CMAKE_CURRENT_LIST_DIR}/CMakeDSMCompiler.cmake.in" | ||
"${CMAKE_PLATFORM_INFO_DIR}/CMakeDSMCompiler.cmake" @ONLY) | ||
|
||
foreach(_var | ||
COMPILER | ||
COMPILER_ID | ||
COMPILER_ARG1 | ||
COMPILER_ENV_VAR | ||
COMPILER_AR | ||
COMPILER_VERSION | ||
) | ||
unset(_CMAKE_DSM_${_var}) | ||
endforeach() |
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,7 @@ | ||
set(_ASM_COMPILER_WORKS 0) | ||
|
||
if(CMAKE_DSM_COMPILER) | ||
set(_DSM_COMPILER_WORKS) | ||
endif() | ||
|
||
set(CMAKE_DSM_COMPILER_WORKS ${_DSM_COMPILER_WORKS} CACHE INTERNAL "") |
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,2 @@ | ||
include_directories(SYSTEM "${PS2SDK}/common/include") | ||
include_directories(SYSTEM "${PS2SDK}/ee/include") |
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,64 @@ | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") | ||
|
||
set(CMAKE_SYSTEM_NAME "Generic") | ||
set(CMAKE_SYSTEM_PROCESSOR "ee") | ||
set(CMAKE_SYSTEM_VERSION 1) | ||
|
||
set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
|
||
set(CMAKE_NO_SYSTEM_FROM_IMPORTED ON) | ||
|
||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) | ||
|
||
if(NOT DEFINED ENV{PS2DEV}) | ||
message(FATAL_ERROR "Need environment variable PS2DEV set") | ||
endif() | ||
if(NOT DEFINED ENV{PS2SDK}) | ||
message(FATAL_ERROR "Need environment variable PS2SDK set") | ||
endif() | ||
set(PS2DEV "$ENV{PS2DEV}") | ||
set(PS2SDK "$ENV{PS2SDK}") | ||
|
||
#set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS "asm;dsm") | ||
|
||
set(CMAKE_DSM_SOURCE_FILE_EXTENSIONS "dsm") | ||
|
||
set(CMAKE_SHARED_LIBRARY_SUFFIX ".erl") | ||
set(CMAKE_EXECUTABLE_SUFFIX ".elf") | ||
|
||
set(CMAKE_C_COMPILER "${PS2DEV}/ee/bin/ee-gcc") | ||
set(CMAKE_CXX_COMPILER "${PS2DEV}/ee/bin/ee-g++") | ||
set(CMAKE_ASM_COMPILER "${PS2DEV}/ee/bin/ee-g++") | ||
set(CMAKE_DSM_COMPILER "${PS2DEV}/dvp/bin/dvp-as") | ||
set(CMAKE_AR "${PS2DEV}/ee/bin/ee-ar" CACHE FILEPATH "archiver") | ||
set(CMAKE_LINKER "${PS2DEV}/ee/bin/ee-ld") | ||
set(CMAKE_RANLIB "${PS2DEV}/ee/bin/ee-ranlib" CACHE FILEPATH "ranlib") | ||
set(CMAKE_STRIP "${PS2DEV}/ee/bin/ee-strip" CACHE FILEPATH "strip") | ||
|
||
set(EE_LDFLAGS "" CACHE STRING "EE linker flags") | ||
set(EE_ASFLAGS "-G0" CACHE STRING "EE assembler flags") | ||
|
||
set(EE_CRT0 "${PS2SDK}/ee/startup/crt0.o" CACHE FILEPATH "EE crt0 file") | ||
set_source_files_properties("${EE_CRT0}" PROPERTIES EXTERNAL_OBJECT ON) | ||
|
||
set(EE_LINKSCRIPT "${PS2SDK}/ee/startup/linkfile" CACHE FILEPATH "EE link script") | ||
|
||
#set(EE_CFLAGS " -nostdlib -fno-common -D_EE" CACHE STRING "EE C/CXX compiler flags") | ||
set(EE_CFLAGS "-D_EE") | ||
set(CMAKE_C_FLAGS_INIT "${EE_CFLAGS}") | ||
set(CMAKE_CXX_FLAGS_INIT "${EE_CFLAGS}") | ||
#set(CMAKE_ASM_FLAGS_INIT "${EE_CFLAGS}") | ||
|
||
set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> cru <TARGET> <LINK_FLAGS> <OBJECTS>") | ||
set(CMAKE_CXX_CREATE_STATIC_LIBRARY "${CMAKE_C_CREATE_STATIC_LIBRARY}") | ||
set(CMAKE_ASM_CREATE_STATIC_LIBRARY "${CMAKE_C_CREATE_STATIC_LIBRARY}") | ||
|
||
set(CMAKE_EXE_LINKER_FLAGS_INIT "-mno-crt0 -T\"${PS2SDK}/ee/startup/linkfile\" \"${EE_CRT0}\" -L\"${PS2SDK}/ee/lib\"") | ||
|
||
set(CMAKE_FIND_ROOT_PATH "${PS2DEV}/ee;${PS2SDK}/ee") | ||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | ||
|
||
set(PS2 1) | ||
set(EE 1) |
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,12 @@ | ||
include("${CMAKE_CURRENT_LIST_DIR}/librw-targets.cmake") | ||
|
||
set(LIBRW_PLATFORM "@LIBRW_PLATFORM@") | ||
set(LIBRW_PLATFORMS "@LIBRW_PLATFORMS@") | ||
set(LIBRW_PLATFORM_@LIBRW_PLATFORM@ ON) | ||
|
||
if(LIBRW_PLATFORM_GL3) | ||
set(OpenGL_GL_PREFERENCE GLVND) | ||
find_package(OpenGL REQUIRED) | ||
find_package(GLEW REQUIRED) | ||
find_package(glfw3 REQUIRED) | ||
endif() |
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,46 @@ | ||
add_library(librw_skeleton | ||
glfw.cpp | ||
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) | ||
endif() | ||
|
||
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 | ||
EXPORT librw-targets | ||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" | ||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
) | ||
endif() |
Oops, something went wrong.