Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CMakeLists.txt #102

Merged
merged 1 commit into from
Feb 2, 2023
Merged

Fix CMakeLists.txt #102

merged 1 commit into from
Feb 2, 2023

Conversation

xiaozhuai
Copy link
Contributor

@xiaozhuai xiaozhuai commented Jan 31, 2023

  1. Add install target for minifb. Allow to use minifb by following.
find_package(minifb CONFIG REQUIRED)
add_executable(my_app main.cpp)
target_link_libraries(my_app PRIVATE minifb::minifb)
  1. Remove msvc runtime library compile options, The CRT linkage should be specified by the user project, not the library.
  2. Remove specify CMAKE_BUILD_TYPE. This should be specified by the user project.

@xiaozhuai xiaozhuai changed the title Add install target Fix CMakeLists.txt Feb 1, 2023
@xiaozhuai
Copy link
Contributor Author

Hello @emoon . Would you please review this pr? If it looks good for you, please merge.

@xiaozhuai
Copy link
Contributor Author

@Darky-Lucera knock~ knock~

@Darky-Lucera
Copy link
Collaborator

Ok, I was looking at your changes and they make sense

Could you explain a little bit the last part?

install(TARGETS minifb EXPORT minifb)
file(GLOB_RECURSE HEADERS "${CMAKE_CURRENT_LIST_DIR}/include/*.h")
install(FILES ${HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
install(EXPORT minifb FILE minifb-config.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/minifb" NAMESPACE minifb::)

@Darky-Lucera Darky-Lucera merged commit 1e087f1 into emoon:master Feb 2, 2023
@xiaozhuai
Copy link
Contributor Author

@Darky-Lucera Thank you for merging this pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants