Skip to content

Commit

Permalink
Refactor cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
durswd committed Oct 25, 2023
1 parent f65d2bb commit 1b8b562
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions Dev/Cpp/EffekseerRendererCommon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ FilterFolder("${LocalHeaders}")
FilterFolder("${LocalSources}")

add_library(${PROJECT_NAME} STATIC ${PublicHeaders} ${LocalHeaders} ${LocalSources})
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/../Effekseer ${EFK_THIRDPARTY_INCLUDES})
target_include_directories(${PROJECT_NAME} PRIVATE ${EFK_THIRDPARTY_INCLUDES})
target_link_libraries(${PROJECT_NAME} PUBLIC Effekseer)

target_include_directories(${PROJECT_NAME} PUBLIC
Expand All @@ -80,11 +80,14 @@ set_target_properties(
${PROJECT_NAME} PROPERTIES PUBLIC_HEADER
"${PublicHeaders}")

foreach (file ${PublicHeaders})
get_filename_component(dir ${file} DIRECTORY)
install(FILES ${file} DESTINATION include/EffekseerRendererCommon/${dir})
endforeach()

install(
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-export
INCLUDES DESTINATION include/EffekseerRendererCommon
PUBLIC_HEADER DESTINATION include/EffekseerRendererCommon
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib)

Expand Down
3 changes: 2 additions & 1 deletion Script/Test_Install/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <Effekseer.h>
#include <EffekseerRenderer.Renderer.h>

#ifdef _WIN32
#include <EffekseerRendererDX11.h>
Expand All @@ -15,4 +16,4 @@ int main()
#endif

return 0;
}
}

0 comments on commit 1b8b562

Please sign in to comment.