CMakeLists.txt: move target-specific logic away
This commit is contained in:
parent
9073d82ea6
commit
787402efcf
|
@ -13,14 +13,9 @@ if(NOT PS1_BUILD AND NOT HOST_BUILD AND NOT WIN9X_BUILD)
|
|||
endif()
|
||||
|
||||
if(PS1_BUILD)
|
||||
if("$ENV{PSXSDK_PATH}" STREQUAL "")
|
||||
message(FATAL_ERROR "Please set PSXSDK_PATH env variable first")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_COMPILER psx-gcc)
|
||||
set(CMAKE_AR mipsel-unknown-elf-ar)
|
||||
include("cmake/ps1-toolchain.cmake")
|
||||
elseif(WIN9X_BUILD)
|
||||
set(CMAKE_C_COMPILER i386-mingw32-gcc)
|
||||
include("cmake/win9x-toolchain.cmake")
|
||||
endif()
|
||||
|
||||
project(rts)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
set(CMAKE_C_COMPILER psx-gcc)
|
||||
set(CMAKE_AR mipsel-unknown-elf-ar)
|
|
@ -1,3 +1,7 @@
|
|||
if("$ENV{PSXSDK_PATH}" STREQUAL "")
|
||||
message(FATAL_ERROR "Please set PSXSDK_PATH env variable first")
|
||||
endif()
|
||||
|
||||
file(MAKE_DIRECTORY ${cdroot})
|
||||
target_link_directories(${PROJECT_NAME} PUBLIC $ENV{PSXSDK_PATH}/lib)
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC -lpsx -lfixmath)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
set(CMAKE_C_COMPILER i386-mingw32-gcc)
|
Loading…
Reference in New Issue