Skip to content

Commit

Permalink
[cmake] update CMAKE_RUNTIME_OUTPUT_DIRECTORY
Browse files Browse the repository at this point in the history
  • Loading branch information
tgfrerer committed Jan 31, 2024
1 parent 2ce9c0a commit b82da59
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
12 changes: 7 additions & 5 deletions CMakeLists.txt.island_prolog.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ set ( DEPENDENCY_DEPTH 0 CACHE INTERNAL "current depth in dependency hierarchy"

set ( PLUGIN_LIBS_DEPENDENCIES "" CACHE INTERNAL "plugins_libs_dependencies" )
set ( PLUGIN_LINK_DIRS "")

set ( CMAKE_DEBUG_POSTFIX "" CACHE STRING "Suffix for debug builds" FORCE )

# specify output directory
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/modules)
set(CMAKE_MODULE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/modules)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/modules)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" CACHE PATH "" FORCE )
set(CMAKE_MODULE_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/modules" CACHE PATH "" FORCE)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/modules" CACHE PATH "archive output directory" FORCE)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/modules" CACHE PATH "" FORCE )

# get git commit version for island framework
execute_process(COMMAND
Expand Down Expand Up @@ -114,7 +116,7 @@ if (REQUIRES_ISLAND_CORE)
include_using_absolute_path("${ISLAND_BASE_DIR}/3rdparty/src/glm/")

# create a link to shared resources
link_resources(${ISLAND_BASE_DIR}/resources ${CMAKE_BINARY_DIR}/resources )
link_resources(${ISLAND_BASE_DIR}/resources ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/resources )

# Check if a local copy of the Vulkan SDK exists, and the environment VULKAN_SDK points to it.
# If yes, use this directory for header includes, and linking.
Expand Down
4 changes: 2 additions & 2 deletions apps/examples/lut_grading_example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set(REQUIRES_ISLAND_CORE ON )
include ("${ISLAND_BASE_DIR}/CMakeLists.txt.island_prolog.in")

# Add custom module search paths
# add_island_module_location(${PROJECT_SOURCE_DIR}/../../modules)
add_island_module_location(${ISLAND_BASE_DIR}/../extra_modules)

# Main application c++ file. Not much to see there,
set (SOURCES main.cpp)
Expand All @@ -40,7 +40,7 @@ add_subdirectory (lut_grading_example_app)
include ("${ISLAND_BASE_DIR}/CMakeLists.txt.island_epilog.in")

# create a link to local resources
link_resources(${PROJECT_SOURCE_DIR}/resources ${CMAKE_BINARY_DIR}/local_resources)
link_resources(${PROJECT_SOURCE_DIR}/resources ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/local_resources)

set_target_properties(${PROJECT_NAME} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")

Expand Down
4 changes: 4 additions & 0 deletions modules/le_imgui/le_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#include <algorithm>
#include <iterator>

#if ( WIN32 )
# pragma comment( lib, "bin/modules/imgui.lib" )
#endif

namespace {
// We use an anonymous namespace here because we don't want to export our shader data to other compilation units
// the code for these files is auto-generated via glslang, and you can recompile from source by issueing
Expand Down
3 changes: 0 additions & 3 deletions modules/le_imgui/le_imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ static const auto& le_imgui_i = api->le_imgui_i;

} // namespace le_imgui

#if ( WIN32 )
# pragma comment( lib, "modules/imgui.lib" )
#endif

#endif // __cplusplus

Expand Down

0 comments on commit b82da59

Please sign in to comment.