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

Improve CMake files #167

Merged
merged 3 commits into from
Apr 5, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeModules/FGInstallDirs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ endif()

# CMake files
if(NOT DEFINED FG_INSTALL_CMAKE_DIR)
set(FG_INSTALL_CMAKE_DIR "cmake" CACHE PATH "Installation path for CMake files")
set(FG_INSTALL_CMAKE_DIR "lib/cmake/Forge" CACHE PATH "Installation path for CMake files")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just cmake works for Windows OS. I was testing this on Windows initially, thus forgot set it for *nix platforms. Can you please add a check for WIN32 and set it to cmake and leave lib/cmake/Forge for the rest.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

endif()

# Use absolute paths (these changes are internal and will not show up in cache)
Expand Down
12 changes: 6 additions & 6 deletions CMakeModules/ForgeConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================

SET(FORGE_VERSION "@FORGE_VERSION@")
SET(Forge_VERSION "@Forge_VERSION@")

@PACKAGE_INIT@

SET_AND_CHECK(FORGE_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@FG_INSTALL_INC_DIR@")
SET_AND_CHECK(FORGE_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/@FG_INSTALL_LIB_DIR@")
SET_AND_CHECK(Forge_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@FG_INSTALL_INC_DIR@")
SET_AND_CHECK(Forge_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/@FG_INSTALL_LIB_DIR@")

FIND_LIBRARY(FORGE_LIBRARIES forge HINTS ${FORGE_LIBRARY_DIRS})
FIND_LIBRARY(Forge_LIBRARIES forge HINTS ${Forge_LIBRARY_DIRS})

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FORGE DEFAULT_MSG
FORGE_INCLUDE_DIRS FORGE_LIBRARIES)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Forge DEFAULT_MSG
Forge_INCLUDE_DIRS Forge_LIBRARIES)