Clean up list usage in CMakeLists
Jeffrey Pfau jeffrey@endrift.com
Tue, 12 Aug 2014 22:06:03 -0700
2 files changed,
9 insertions(+),
9 deletions(-)
M
CMakeLists.txt
→
CMakeLists.txt
@@ -12,7 +12,7 @@ file(GLOB GBA_SRC ${CMAKE_SOURCE_DIR}/src/gba/*.c)
file(GLOB UTIL_SRC ${CMAKE_SOURCE_DIR}/src/util/*.[cS]) file(GLOB VFS_SRC ${CMAKE_SOURCE_DIR}/src/util/vfs/*.c) file(GLOB RENDERER_SRC ${CMAKE_SOURCE_DIR}/src/gba/renderers/video-software.c) -set(UTIL_SRC ${UTIL_SRC};${CMAKE_SOURCE_DIR}/src/platform/commandline.c) +list(APPEND UTIL_SRC ${CMAKE_SOURCE_DIR}/src/platform/commandline.c) source_group("ARM core" FILES ${ARM_SRC}) source_group("GBA board" FILES ${GBA_SRC} ${RENDERER_SRC}) source_group("Utilities" FILES ${UTIL_SRC} ${VFS_SRC}})@@ -51,12 +51,12 @@ endif()
if(WIN32) add_definitions(-D_WIN32_WINNT=0x0600) - set(OS_LIB "${OS_LIB};Ws2_32") + list(APPEND OS_LIB Ws2_32) file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/windows/*.c) source_group("Windows-specific code" FILES ${OS_SRC}) else() add_definitions(-DUSE_PTHREADS) - set(OS_LIB "${OS_LIB};pthread") + list(APPEND OS_LIB pthread) file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/posix/*.c) source_group("POSIX-specific code" FILES ${OS_SRC}) endif()@@ -68,14 +68,14 @@ add_definitions(-DCOLOR_16_BIT -DCOLOR_5_6_5)
endif() endif() -set(DEBUGGER_SRC "${CMAKE_SOURCE_DIR}/src/debugger/debugger.c;${CMAKE_SOURCE_DIR}/src/debugger/memory-debugger.c") +set(DEBUGGER_SRC ${CMAKE_SOURCE_DIR}/src/debugger/debugger.c ${CMAKE_SOURCE_DIR}/src/debugger/memory-debugger.c) if(USE_CLI_DEBUGGER) pkg_search_module(EDIT libedit) if(EDIT_FOUND) add_definitions(-DUSE_CLI_DEBUGGER) - list(APPEND DEBUGGER_SRC "${CMAKE_SOURCE_DIR}/src/debugger/cli-debugger.c") - list(APPEND DEBUGGER_SRC "${CMAKE_SOURCE_DIR}/src/debugger/parser.c") + list(APPEND DEBUGGER_SRC ${CMAKE_SOURCE_DIR}/src/debugger/cli-debugger.c) + list(APPEND DEBUGGER_SRC ${CMAKE_SOURCE_DIR}/src/debugger/parser.c) set(DEBUGGER_LIB ${EDIT_LIBRARIES}) else() message(WARNING "Could not find libedit for CLI debugger support")@@ -87,7 +87,7 @@ endif()
if(USE_GDB_STUB) add_definitions(-DUSE_GDB_STUB) - set(DEBUGGER_SRC "${DEBUGGER_SRC};${CMAKE_SOURCE_DIR}/src/debugger/gdb-stub.c") + list(APPEND DEBUGGER_SRC ${CMAKE_SOURCE_DIR}/src/debugger/gdb-stub.c) endif() source_group("ARM debugger" FILES ${DEBUGGER_SRC})@@ -105,7 +105,7 @@
if(BUILD_PERF) set(PERF_SRC ${CMAKE_SOURCE_DIR}/src/platform/perf-main.c) if(UNIX AND NOT APPLE) - set(PERF_LIB "${PERF_LIB};rt") + list(APPEND PERF_LIB rt) endif() add_executable(${BINARY_NAME}-perf ${PERF_SRC})
M
src/platform/sdl/CMakeLists.txt
→
src/platform/sdl/CMakeLists.txt
@@ -17,7 +17,7 @@ find_package(SDL 1.2 REQUIRED)
endif() file(GLOB PLATFORM_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/sdl-*.c) -set(PLATFORM_LIBRARY "${SDL_LIBRARY};${SDLMAIN_LIBRARY}") +set(PLATFORM_LIBRARY ${SDL_LIBRARY} ${SDLMAIN_LIBRARY}) include_directories(${CMAKE_SOURCE_DIR}/src/platform/sdl ${SDL_INCLUDE_DIR}) if(BUILD_RASPI)